<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>Redis | PhpRedis API</title>

            <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="css/doctum.css">
        <link rel="stylesheet" type="text/css" href="fonts/doctum-font.css">
        <script src="js/jquery-3.5.1.slim.min.js"></script>
        <script async defer src="doctum.js"></script>
        <script async defer src="js/bootstrap.min.js"></script>
        <script async defer src="js/autocomplete.min.js"></script>
        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">

        <link rel="search"
          type="application/opensearchdescription+xml"
          href="https://phpredis.github.io/opensearch.xml"
          title="PhpRedis API (main)" />
    </head>

    <body id="class" data-name="class:Redis" data-root-path="" data-search-index-url="doctum-search.json">
            <div id="content">
        <div id="left-column">
                <div id="control-panel">
                <div class="search-bar hidden" id="search-progress-bar-container">
            <div class="progress">
                <div class="progress-bar" role="progressbar" id="search-progress-bar"
                    aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
            </div>
        </div>
        <form id="search-form" action="search.html">
            <span class="icon icon-search"></span>
            <input name="search"
                   id="doctum-search-auto-complete"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search"
                   spellcheck="false"
                   autocorrect="off"
                   autocomplete="off"
                   autocapitalize="off">
            <div class="auto-complete-results" id="auto-complete-results"></div>
        </form>
    </div>

                <div id="api-tree"></div>

        </div>
        <div id="right-column">
                <nav id="site-nav" class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">PhpRedis API</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-elements">
                <ul class="nav navbar-nav">
                    <li><a href="classes.html">Classes</a></li>
                    <li><a href="interfaces.html">Interfaces</a></li>
                    <li><a href="traits.html">Traits</a></li>
                    <li><a href="doc-index.html">Index</a></li>
                    <li><a href="search.html">Search</a></li>
                </ul>
            </div>
        </div>
    </nav>

                            <div id="page-content">
    <div class="page-header">
        <h1>Redis    
            </h1>
    </div>

    
    <p>        class
    <strong>Redis</strong>        (<a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php">View source</a>)
</p>

        
    
        

            
        
    
    
            <h2>Methods</h2>

            <div class="container-fluid underlined">
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>
                </div>
                <div class="col-md-8">
                    <a href="#method___construct">__construct</a>(array $options = null)
        
                                            <p><p>Create a new Redis instance.  If passed sufficient information in the
options array it is also possible to connect to an instance at the same
time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    
                </div>
                <div class="col-md-8">
                    <a href="#method___destruct">__destruct</a>()
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__compress">_compress</a>(string $value)
        
                                            <p><p>Compress a value with the currently configured compressor as set with
Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__uncompress">_uncompress</a>(string $value)
        
                                            <p><p>Uncompress the provided argument that has been compressed with the
currently configured compressor as set with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__prefix">_prefix</a>(string $key)
        
                                            <p><p>Prefix the passed argument with the currently set key prefix as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__serialize">_serialize</a>(mixed $value)
        
                                            <p><p>Serialize the provided value with the currently set serializer as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method__unserialize">_unserialize</a>(string $value)
        
                                            <p><p>Unserialize the passed argument with the currently set serializer as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__pack">_pack</a>(mixed $value)
        
                                            <p><p>Pack the provided value with the configured serializer and compressor
as set with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method__unpack">_unpack</a>(string $value)
        
                                            <p><p>Unpack the provided value with the configured compressor and serializer
as set with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_acl">acl</a>(string $subcmd, string ...$args)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_append">append</a>(string $key, mixed $value)
        
                                            <p><p>Append data to a Redis STRING key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_auth">auth</a>(mixed $credentials)
        
                                            <p><p>Authenticate a Redis connection after its been established.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_bgSave">bgSave</a>()
        
                                            <p><p>Execute a save of the Redis database in the background.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_bgrewriteaof">bgrewriteaof</a>()
        
                                            <p><p>Asynchronously rewrite Redis' append-only file</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitcount">bitcount</a>(string $key, int $start = 0, int $end = -1, bool $bybit = false)
        
                                            <p><p>Count the number of set bits in a Redis string.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitop">bitop</a>(string $operation, string $deskey, string $srckey, string ...$other_keys)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitpos">bitpos</a>(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
        
                                            <p><p>Return the position of the first bit set to 0 or 1 in a string.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_blPop">blPop</a>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>Pop an element off the beginning of a Redis list or lists, potentially blocking up to a specified
timeout.  This method may be called in two distinct ways, of which examples are provided below.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_brPop">brPop</a>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>Pop an element off of the end of a Redis list or lists, potentially blocking up to a specified timeout.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_brpoplpush">brpoplpush</a>(string $src, string $dst, int|float $timeout)
        
                                            <p><p>Pop an element from the end of a Redis list, pushing it to the beginning of another Redis list,
optionally blocking up to a specified timeout.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzPopMax">bzPopMax</a>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>POP the maximum scoring element off of one or more sorted sets, blocking up to a specified
timeout if no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzPopMin">bzPopMin</a>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>POP the minimum scoring element off of one or more sorted sets, blocking up to a specified timeout
if no elements are available</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzmpop">bzmpop</a>(float $timeout, array $keys, string $from, int $count = 1)
        
                                            <p><p>POP one or more elements from one or more sorted sets, blocking up to a specified amount of time
when no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zmpop">zmpop</a>(array $keys, string $from, int $count = 1)
        
                                            <p><p>POP one or more of the highest or lowest scoring elements from one or more sorted sets.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_blmpop">blmpop</a>(float $timeout, array $keys, string $from, int $count = 1)
        
                                            <p><p>Pop one or more elements from one or more Redis LISTs, blocking up to a specified timeout when
no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lmpop">lmpop</a>(array $keys, string $from, int $count = 1)
        
                                            <p><p>Pop one or more elements off of one or more Redis LISTs.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_clearLastError">clearLastError</a>()
        
                                            <p><p>Reset any last error on the connection to NULL</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_client">client</a>(string $opt, mixed ...$args)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_close">close</a>()
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_command">command</a>(string $opt = null, string|array $arg)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_config">config</a>(string $operation, array|string|null $key_or_settings = NULL, string|null $value = NULL)
        
                                            <p><p>Execute the Redis CONFIG command in a variety of ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_connect">connect</a>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array $context = null)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_copy">copy</a>(string $src, string $dst, array $options = null)
        
                                            <p><p>Make a copy of a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_dbSize">dbSize</a>()
        
                                            <p><p>Return the number of keys in the currently selected Redis database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string
                </div>
                <div class="col-md-8">
                    <a href="#method_debug">debug</a>(string $key)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_decr">decr</a>(string $key, int $by = 1)
        
                                            <p><p>Decrement a Redis integer by 1 or a provided value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_decrBy">decrBy</a>(string $key, int $value)
        
                                            <p><p>Decrement a redis integer by a value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_del">del</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Delete one or more keys from Redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_delete">delete</a>(array|string $key, string ...$other_keys)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_discard">discard</a>()
        
                                            <p><p>Discard a transaction currently in progress.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string
                </div>
                <div class="col-md-8">
                    <a href="#method_dump">dump</a>(string $key)
        
                                            <p><p>Dump Redis' internal binary representation of a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_echo">echo</a>(string $str)
        
                                            <p><p>Have Redis repeat back an arbitrary string to the client.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_eval">eval</a>(string $script, array $args = [], int $num_keys = 0)
        
                                            <p><p>Execute a LUA script on the redis server.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_eval_ro">eval_ro</a>(string $script_sha, array $args = [], int $num_keys = 0)
        
                                            <p><p>This is simply the read-only variant of eval, meaning the underlying script
may not modify data in redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_evalsha">evalsha</a>(string $sha1, array $args = [], int $num_keys = 0)
        
                                            <p><p>Execute a LUA script on the server but instead of sending the script, send
the SHA1 hash of the script.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_evalsha_ro">evalsha_ro</a>(string $sha1, array $args = [], int $num_keys = 0)
        
                                            <p><p>This is simply the read-only variant of evalsha, meaning the underlying script
may not modify data in redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_exec">exec</a>()
        
                                            <p><p>Execute either a MULTI or PIPELINE block and return the array of replies.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_exists">exists</a>(mixed $key, mixed ...$other_keys)
        
                                            <p><p>Test if one or more keys exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_expire">expire</a>(string $key, int $timeout, string|null $mode = NULL)
        
                                            <p><p>Sets an expiration in seconds on the key in question.  If connected to
redis-server &gt;= 7.0.0 you may send an additional &quot;mode&quot; argument which
modifies how the command will execute.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_expireAt">expireAt</a>(string $key, int $timestamp, string|null $mode = NULL)
        
                                            <p><p>Set a key to expire at an exact unix timestamp.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_failover">failover</a>(array|null $to = null, bool $abort = false, int $timeout = 0)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_expiretime">expiretime</a>(string $key)
        
                                            <p><p>Get the expiration of a given key as a unix timestamp</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpiretime">pexpiretime</a>(string $key)
        
                                            <p><p>Get the expiration timestamp of a given Redis key but in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_flushAll">flushAll</a>(bool|null $sync = null)
        
                                            <p><p>Deletes every key in all Redis databases</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_flushDB">flushDB</a>(bool|null $sync = null)
        
                                            <p><p>Deletes all the keys of the currently selected database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geoadd">geoadd</a>(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
        
                                            <p><p>Add one or more members to a geospacial sorted set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geodist">geodist</a>(string $key, string $src, string $dst, string|null $unit = null)
        
                                            <p><p>Get the distance between two members of a geospacially encoded sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geohash">geohash</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Retrieve one or more GeoHash encoded strings for members of the set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geopos">geopos</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Return the longitude and latitude for one or more members of a geospacially encoded sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadius">georadius</a>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        
                                            <p><p>Retrieve members of a geospacially sorted set that are within a certain radius of a location.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadius_ro">georadius_ro</a>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        
                                            <p><p>A readonly variant of <code>GEORADIUS</code> that may be executed on replicas.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadiusbymember">georadiusbymember</a>(string $key, string $member, float $radius, string $unit, array $options = [])
        
                                            <p><p>Similar to <code>GEORADIUS</code> except it uses a member as the center of the query.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadiusbymember_ro">georadiusbymember_ro</a>(string $key, string $member, float $radius, string $unit, array $options = [])
        
                                            <p><p>This is the read-only variant of <code>GEORADIUSBYMEMBER</code> that can be run on replicas.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_geosearch">geosearch</a>(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
        
                                            <p><p>Search a geospacial sorted set for members in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geosearchstore">geosearchstore</a>(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
        
                                            <p><p>Search a geospacial sorted set for members within a given area or range, storing the results into
a new set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_get">get</a>(string $key)
        
                                            <p><p>Retrieve a string keys value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_getAuth">getAuth</a>()
        
                                            <p><p>Get the authentication information on the connection, if any.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getBit">getBit</a>(string $key, int $idx)
        
                                            <p><p>Get the bit at a given index in a string key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_getEx">getEx</a>(string $key, array $options = [])
        
                                            <p><p>Get the value of a key and optionally set it's expiration.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getDBNum">getDBNum</a>()
        
                                            <p><p>Get the database number PhpRedis thinks we're connected to.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_getDel">getDel</a>(string $key)
        
                                            <p><p>Get a key from Redis and delete it in an atomic operation.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method_getHost">getHost</a>()
        
                                            <p><p>Return the host or Unix socket we are connected to.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|null
                </div>
                <div class="col-md-8">
                    <a href="#method_getLastError">getLastError</a>()
        
                                            <p><p>Get the last error returned to us from Redis, if any.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getMode">getMode</a>()
        
                                            <p><p>Returns whether the connection is in ATOMIC, MULTI, or PIPELINE mode</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_getOption">getOption</a>(int $option)
        
                                            <p><p>Retrieve the value of a configuration setting as set by Redis::setOption()</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|null
                </div>
                <div class="col-md-8">
                    <a href="#method_getPersistentID">getPersistentID</a>()
        
                                            <p><p>Get the persistent connection ID, if there is one.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getPort">getPort</a>()
        
                                            <p><p>Get the port we are connected to.  This number will be zero if we are connected to a unix socket.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getRange">getRange</a>(string $key, int $start, int $end)
        
                                            <p><p>Retrieve a substring of a string by index.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lcs">lcs</a>(string $key1, string $key2, array|null $options = NULL)
        
                                            <p><p>Get the longest common subsequence between two string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    float
                </div>
                <div class="col-md-8">
                    <a href="#method_getReadTimeout">getReadTimeout</a>()
        
                                            <p><p>Get the currently set read timeout on the connection.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getset">getset</a>(string $key, mixed $value)
        
                                            <p><p>Sets a key and returns any previously set value, if the key already existed.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getTimeout">getTimeout</a>()
        
                                            <p><p>Retrieve any set connection timeout</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getTransferredBytes">getTransferredBytes</a>()
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hDel">hDel</a>(string $key, string $field, string ...$other_fields)
        
                                            <p><p>Remove one or more fields from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hExists">hExists</a>(string $key, string $field)
        
                                            <p><p>Checks whether a field exists in a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_hGet">hGet</a>(string $key, string $member)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hGetAll">hGetAll</a>(string $key)
        
                                            <p><p>Read every field and value from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hIncrBy">hIncrBy</a>(string $key, string $field, int $value)
        
                                            <p><p>Increment a hash field's value by an integer</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hIncrByFloat">hIncrByFloat</a>(string $key, string $field, float $value)
        
                                            <p><p>Increment a hash field by a floating point value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hKeys">hKeys</a>(string $key)
        
                                            <p><p>Retrieve all of the fields of a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hLen">hLen</a>(string $key)
        
                                            <p><p>Get the number of fields in a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hMget">hMget</a>(string $key, array $fields)
        
                                            <p><p>Get one or more fields from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hMset">hMset</a>(string $key, array $fieldvals)
        
                                            <p><p>Add or update one or more hash fields and values</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_hRandField">hRandField</a>(string $key, array $options = null)
        
                                            <p><p>Get one or more random field from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hSet">hSet</a>(string $key, string $member, mixed $value)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hSetNx">hSetNx</a>(string $key, string $field, string $value)
        
                                            <p><p>Set a hash field and value, but only if that field does not exist</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hStrLen">hStrLen</a>(string $key, string $field)
        
                                            <p><p>Get the string length of a hash field</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hVals">hVals</a>(string $key)
        
                                            <p><p>Get all of the values from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hscan">hscan</a>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Iterate over the fields and values of a hash in an incremental fashion.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incr">incr</a>(string $key, int $by = 1)
        
                                            <p><p>Increment a key's value, optionally by a specific amount.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incrBy">incrBy</a>(string $key, int $value)
        
                                            <p><p>Increment a key by a specific integer value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incrByFloat">incrByFloat</a>(string $key, float $value)
        
                                            <p><p>Increment a numeric key by a floating point value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_info">info</a>(string ...$sections)
        
                                            <p><p>Retrieve information about the connected redis-server.  If no arguments are passed to
this function, redis will return every info field.  Alternatively you may pass a specific
section you want returned (e.g. 'server', or 'memory') to receive only information pertaining
to that section.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_isConnected">isConnected</a>()
        
                                            <p><p>Check if we are currently connected to a Redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_keys">keys</a>(string $pattern)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lInsert">lInsert</a>(string $key, string $pos, mixed $pivot, mixed $value)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lLen">lLen</a>(string $key)
        
                                            <p><p>Retrieve the length of a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lMove">lMove</a>(string $src, string $dst, string $wherefrom, string $whereto)
        
                                            <p><p>Move an element from one list into another.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_lPop">lPop</a>(string $key, int $count = 0)
        
                                            <p><p>Pop one or more elements off a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|null|bool|int|array
                </div>
                <div class="col-md-8">
                    <a href="#method_lPos">lPos</a>(string $key, mixed $value, array $options = null)
        
                                            <p><p>Retrieve the index of an element in a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lPush">lPush</a>(string $key, mixed ...$elements)
        
                                            <p><p>Prepend one or more elements to a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rPush">rPush</a>(string $key, mixed ...$elements)
        
                                            <p><p>Append one or more elements to a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lPushx">lPushx</a>(string $key, mixed $value)
        
                                            <p><p>Prepend an element to a list but only if the list exists</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rPushx">rPushx</a>(string $key, mixed $value)
        
                                            <p><p>Append an element to a list but only if the list exists</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_lSet">lSet</a>(string $key, int $index, mixed $value)
        
                                            <p><p>Set a list element at an index to a specific value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_lastSave">lastSave</a>()
        
                                            <p><p>Retrieve the last time Redis' database was persisted to disk.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_lindex">lindex</a>(string $key, int $index)
        
                                            <p><p>Get the element of a list by its index.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lrange">lrange</a>(string $key, int $start, int $end)
        
                                            <p><p>Retrieve elements from a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lrem">lrem</a>(string $key, mixed $value, int $count = 0)
        
                                            <p><p>Remove one or more matching elements from a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_ltrim">ltrim</a>(string $key, int $start, int $end)
        
                                            <p><p>Trim a list to a subrange of elements.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array
                </div>
                <div class="col-md-8">
                    <a href="#method_mget">mget</a>(array $keys)
        
                                            <p><p>Get one ore more string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_migrate">migrate</a>(string $host, int $port, string|array $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = NULL)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_move">move</a>(string $key, int $index)
        
                                            <p><p>Move a key to a different database on the same redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_mset">mset</a>(array $key_values)
        
                                            <p><p>Set one ore more string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_msetnx">msetnx</a>(array $key_values)
        
                                            <p><p>Set one ore more string keys but only if none of the key exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool|Redis
                </div>
                <div class="col-md-8">
                    <a href="#method_multi">multi</a>(int $value = Redis::MULTI)
        
                                            <p><p>Begin a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_object">object</a>(string $subcommand, string $key)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_open">open</a>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pconnect">pconnect</a>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_persist">persist</a>(string $key)
        
                                            <p><p>Remove the expiration from a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpire">pexpire</a>(string $key, int $timeout, string|null $mode = NULL)
        
                                            <p><p>Sets an expiration in milliseconds on a given key.  If connected to Redis &gt;= 7.0.0
you can pass an optional mode argument that modifies how the command will execute.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpireAt">pexpireAt</a>(string $key, int $timestamp, string|null $mode = NULL)
        
                                            <p><p>Set a key's expiration to a specific Unix Timestamp in milliseconds.  If connected to
Redis &gt;= 7.0.0 you can pass an optional 'mode' argument.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int
                </div>
                <div class="col-md-8">
                    <a href="#method_pfadd">pfadd</a>(string $key, array $elements)
        
                                            <p><p>Add one or more elements to a Redis HyperLogLog key</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int
                </div>
                <div class="col-md-8">
                    <a href="#method_pfcount">pfcount</a>(string $key)
        
                                            <p><p>Retrieve the cardinality of a Redis HyperLogLog key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pfmerge">pfmerge</a>(string $dst, array $srckeys)
        
                                            <p><p>Merge one or more source HyperLogLog sets into a destination set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_ping">ping</a>(string $message = NULL)
        
                                            <p><p>PING the redis server with an optional string argument.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool|Redis
                </div>
                <div class="col-md-8">
                    <a href="#method_pipeline">pipeline</a>()
        
                                            <p><p>Enter into pipeline mode.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_popen">popen</a>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_psetex">psetex</a>(string $key, int $expire, mixed $value)
        
                                            <p><p>Set a key with an expiration time in milliseconds</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_psubscribe">psubscribe</a>(array $patterns, callable $cb)
        
                                            <p><p>Subscribe to one or more glob-style patterns</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_pttl">pttl</a>(string $key)
        
                                            <p><p>Get a keys time to live in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_publish">publish</a>(string $channel, string $message)
        
                                            <p><p>Publish a message to a pubsub channel</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_pubsub">pubsub</a>(string $command, mixed $arg = null)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_punsubscribe">punsubscribe</a>(array $patterns)
        
                                            <p><p>Unsubscribe from one or more channels by pattern</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_rPop">rPop</a>(string $key, int $count = 0)
        
                                            <p><p>Pop one or more elements from the end of a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_randomKey">randomKey</a>()
        
                                            <p><p>Return a random key from the current database</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_rawcommand">rawcommand</a>(string $command, mixed ...$args)
        
                                            <p><p>Execute any arbitrary Redis command by name.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_rename">rename</a>(string $old_name, string $new_name)
        
                                            <p><p>Unconditionally rename a key from $old_name to $new_name</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_renameNx">renameNx</a>(string $key_src, string $key_dst)
        
                                            <p><p>Renames $key_src to $key_dst but only if newkey does not exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_reset">reset</a>()
        
                                            <p><p>Reset the state of the connection.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_restore">restore</a>(string $key, int $ttl, string $value, array|null $options = NULL)
        
                                            <p><p>Restore a key by the binary payload generated by the DUMP command.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_role">role</a>()
        
                                            <p><p>Query whether the connected instance is a primary or replica</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rpoplpush">rpoplpush</a>(string $srckey, string $dstkey)
        
                                            <p><p>Atomically pop an element off the end of a Redis LIST and push it to the beginning of
another.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sAdd">sAdd</a>(string $key, mixed $value, mixed ...$other_values)
        
                                            <p><p>Add one or more values to a Redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_sAddArray">sAddArray</a>(string $key, array $values)
        
                                            <p><p>Add one ore more values to a Redis SET key.  This is an alternative to Redis::sadd() but
instead of being variadic, takes a single array of values.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sDiff">sDiff</a>(string $key, string ...$other_keys)
        
                                            <p><p>Given one or more Redis SETS, this command returns all of the members from the first
set that are not in any subsequent set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sDiffStore">sDiffStore</a>(string $dst, string $key, string ...$other_keys)
        
                                            <p><p>This method performs the same operation as SDIFF except it stores the resulting diff
values in a specified destination key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sInter">sInter</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Given one or more Redis SET keys, this command will return all of the elements that are
in every one.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sintercard">sintercard</a>(array $keys, int $limit = -1)
        
                                            <p><p>Compute the intersection of one or more sets and return the cardinality of the result.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sInterStore">sInterStore</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Perform the intersection of one or more Redis SETs, storing the result in a destination
key, rather than returning them.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sMembers">sMembers</a>(string $key)
        
                                            <p><p>Retrieve every member from a set key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sMisMember">sMisMember</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Check if one or more values are members of a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_sMove">sMove</a>(string $src, string $dst, mixed $value)
        
                                            <p><p>Pop a member from one set and push it onto another.  This command will create the
destination set if it does not currently exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sPop">sPop</a>(string $key, int $count = 0)
        
                                            <p><p>Remove one or more elements from a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sRandMember">sRandMember</a>(string $key, int $count = 0)
        
                                            <p><p>Retrieve one or more random members of a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sUnion">sUnion</a>(string $key, string ...$other_keys)
        
                                            <p><p>Returns the union of one or more Redis SET keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sUnionStore">sUnionStore</a>(string $dst, string $key, string ...$other_keys)
        
                                            <p><p>Perform a union of one or more Redis SET keys and store the result in a new set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_save">save</a>()
        
                                            <p><p>Persist the Redis database to disk.  This command will block the server until the save is
completed.  For a nonblocking alternative, see Redis::bgsave().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_scan">scan</a>(int|null $iterator, string|null $pattern = null, int $count = 0, string $type = NULL)
        
                                            <p><p>Incrementally scan the Redis keyspace, with optional pattern and type matching.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_scard">scard</a>(string $key)
        
                                            <p><p>Retrieve the number of members in a Redis set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_script">script</a>(string $command, mixed ...$args)
        
                                            <p><p>An administrative command used to interact with LUA scripts stored on the server.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_select">select</a>(int $db)
        
                                            <p><p>Select a specific Redis database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_set">set</a>(string $key, mixed $value, mixed $options = NULL)
        
                                            <p><p>Create or set a Redis STRING key to a value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_setBit">setBit</a>(string $key, int $idx, bool $value)
        
                                            <p><p>Set a specific bit in a Redis string to zero or one</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_setRange">setRange</a>(string $key, int $index, string $value)
        
                                            <p><p>Update or append to a Redis string at a specific starting index</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setOption">setOption</a>(int $option, mixed $value)
        
                                            <p><p>Set a configurable option on the Redis object.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setex">setex</a>(string $key, int $expire, mixed $value)
        
                                            <p><p>Set a Redis STRING key with a specific expiration in seconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setnx">setnx</a>(string $key, mixed $value)
        
                                            <p><p>Set a key to a value, but only if that key does not already exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_sismember">sismember</a>(string $key, mixed $value)
        
                                            <p><p>Check whether a given value is the member of a Redis SET.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_slaveof">slaveof</a>(string $host = NULL, int $port = 6379)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p><p>Turn a redis instance into a replica of another or promote a replica
to a primary.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_replicaof">replicaof</a>(string $host = NULL, int $port = 6379)
        
                                            <p><p>Used to turn a Redis instance into a replica of another, or to remove
replica status promoting the instance to a primary.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_touch">touch</a>(array|string $key_or_array, string ...$more_keys)
        
                                            <p><p>Update one or more keys last modified metadata.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_slowlog">slowlog</a>(string $operation, int $length = 0)
        
                                            <p><p>Interact with Redis' slowlog functionality in various ways, depending
on the value of 'operation'.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_sort">sort</a>(string $key, array|null $options = null)
        
                                            <p><p>Sort the contents of a Redis key in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_sort_ro">sort_ro</a>(string $key, array|null $options = null)
        
                                            <p><p>This is simply a read-only variant of the sort command</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortAsc">sortAsc</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortAscAlpha">sortAscAlpha</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortDesc">sortDesc</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortDescAlpha">sortDescAlpha</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_srem">srem</a>(string $key, mixed $value, mixed ...$other_values)
        
                                            <p><p>Remove one or more values from a Redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sscan">sscan</a>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Scan the members of a redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_strlen">strlen</a>(string $key)
        
                                            <p><p>Retrieve the length of a Redis STRING key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_subscribe">subscribe</a>(array $channels, callable $cb)
        
                                            <p><p>Subscribe to one or more Redis pubsub channels.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_swapdb">swapdb</a>(int $src, int $dst)
        
                                            <p><p>Atomically swap two Redis databases so that all of the keys in the source database will
now be in the destination database and vice-versa.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array
                </div>
                <div class="col-md-8">
                    <a href="#method_time">time</a>()
        
                                            <p><p>Retrieve the server time from the connected Redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_ttl">ttl</a>(string $key)
        
                                            <p><p>Get the amount of time a Redis key has before it will expire, in seconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_type">type</a>(string $key)
        
                                            <p><p>Get the type of a given Redis key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_unlink">unlink</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Delete one or more keys from the Redis database.  Unlike this operation, the actual
deletion is asynchronous, meaning it is safe to delete large keys without fear of
Redis blocking for a long period of time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_unsubscribe">unsubscribe</a>(array $channels)
        
                                            <p><p>Unsubscribe from one or more subscribed channels.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_unwatch">unwatch</a>()
        
                                            <p><p>Remove any previously WATCH'ed keys in a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_watch">watch</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Watch one or more keys for conditional execution of a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_wait">wait</a>(int $numreplicas, int $timeout)
        
                                            <p><p>Block the client up to the provided timeout until a certain number of replicas have confirmed
receiving them.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xack">xack</a>(string $key, string $group, array $ids)
        
                                            <p><p>Acknowledge one ore more messages that are pending (have been consumed using XREADGROUP but
not yet acknowledged by XACK.)</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xadd">xadd</a>(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
        
                                            <p><p>Append a message to a stream.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool|array
                </div>
                <div class="col-md-8">
                    <a href="#method_xautoclaim">xautoclaim</a>(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
        
                                            <p><p>This command allows a consumer to claim pending messages that have been idle for a specified period of time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xclaim">xclaim</a>(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
        
                                            <p><p>This method allows a consumer to take ownership of pending stream entries, by ID.  Another
command that does much the same thing but does not require passing specific IDs is <code>Redis::xAutoClaim</code>.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xdel">xdel</a>(string $key, array $ids)
        
                                            <p><p>Remove one or more specific IDs from a stream.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_xgroup">xgroup</a>(string $operation, string $key = null, string $group = null, string $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)
        
                                            <p>XGROUP</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_xinfo">xinfo</a>(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
        
                                            <p><p>Retrieve information about a stream key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xlen">xlen</a>(string $key)
        
                                            <p><p>Get the number of messages in a Redis STREAM key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xpending">xpending</a>(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)
        
                                            <p><p>Interact with stream messages that have been consumed by a consumer group but not yet
acknowledged with XACK.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xrange">xrange</a>(string $key, string $start, string $end, int $count = -1)
        
                                            <p><p>Get a range of entries from a STREAM key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xread">xread</a>(array $streams, int $count = -1, int $block = -1)
        
                                            <p><p>Consume one or more unconsumed elements in one or more streams.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xreadgroup">xreadgroup</a>(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
        
                                            <p><p>Read one or more messages using a consumer group.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xrevrange">xrevrange</a>(string $key, string $end, string $start, int $count = -1)
        
                                            <p><p>Get a range of entries from a STREAM key in reverse chronological order.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xtrim">xtrim</a>(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
        
                                            <p><p>Truncate a STREAM key in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zAdd">zAdd</a>(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
        
                                            <p><p>Add one or more elements and scores to a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zCard">zCard</a>(string $key)
        
                                            <p><p>Return the number of elements in a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zCount">zCount</a>(string $key, string $start, string $end)
        
                                            <p><p>Count the number of members in a sorted set with scores inside a provided range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zIncrBy">zIncrBy</a>(string $key, float $value, mixed $member)
        
                                            <p><p>Create or increment the score of a member in a Redis sorted set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zLexCount">zLexCount</a>(string $key, string $min, string $max)
        
                                            <p><p>Count the number of elements in a sorted set whose members fall within the provided
lexographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zMscore">zMscore</a>(string $key, mixed $member, mixed ...$other_members)
        
                                            <p><p>Retrieve the score of one or more members in a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zPopMax">zPopMax</a>(string $key, int $count = null)
        
                                            <p><p>Pop one or more of the highest scoring elements from a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zPopMin">zPopMin</a>(string $key, int $count = null)
        
                                            <p><p>Pop one or more of the lowest scoring elements from a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRange">zRange</a>(string $key, mixed $start, mixed $end, array|bool|null $options = null)
        
                                            <p><p>Retrieve a range of elements of a sorted set between a start and end point.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRangeByLex">zRangeByLex</a>(string $key, string $min, string $max, int $offset = -1, int $count = -1)
        
                                            <p><p>Retrieve a range of elements from a sorted set by legographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRangeByScore">zRangeByScore</a>(string $key, string $start, string $end, array $options = [])
        
                                            <p><p>Retrieve a range of members from a sorted set by their score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zrangestore">zrangestore</a>(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = NULL)
        
                                            <p><p>This command is similar to ZRANGE except that instead of returning the values directly
it will store them in a destination key provided by the user</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_zRandMember">zRandMember</a>(string $key, array $options = null)
        
                                            <p><p>Retrieve one or more random members from a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRank">zRank</a>(string $key, mixed $member)
        
                                            <p><p>Get the rank of a member of a sorted set, by score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRem">zRem</a>(mixed $key, mixed $member, mixed ...$other_members)
        
                                            <p><p>Remove one or more members from a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByLex">zRemRangeByLex</a>(string $key, string $min, string $max)
        
                                            <p><p>Remove zero or more elements from a Redis sorted set by legographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByRank">zRemRangeByRank</a>(string $key, int $start, int $end)
        
                                            <p><p>Remove one or more members of a sorted set by their rank.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByScore">zRemRangeByScore</a>(string $key, string $start, string $end)
        
                                            <p><p>Remove one or more members of a sorted set by their score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRange">zRevRange</a>(string $key, int $start, int $end, mixed $scores = null)
        
                                            <p><p>List the members of a Redis sorted set in reverse order</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRangeByLex">zRevRangeByLex</a>(string $key, string $max, string $min, int $offset = -1, int $count = -1)
        
                                            <p><p>List members of a Redis sorted set within a legographical range, in reverse order.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRangeByScore">zRevRangeByScore</a>(string $key, string $max, string $min, array|bool $options = [])
        
                                            <p><p>List elements from a Redis sorted set by score, highest to lowest</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRank">zRevRank</a>(string $key, mixed $member)
        
                                            <p><p>Retrieve a member of a sorted set by reverse rank.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zScore">zScore</a>(string $key, mixed $member)
        
                                            <p><p>Get the score of a member of a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zdiff">zdiff</a>(array $keys, array $options = null)
        
                                            <p><p>Given one or more sorted set key names, return every element that is in the first
set but not any of the others.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zdiffstore">zdiffstore</a>(string $dst, array $keys)
        
                                            <p><p>Store the difference of one or more sorted sets in a destination sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zinter">zinter</a>(array $keys, array|null $weights = null, array|null $options = null)
        
                                            <p><p>Compute the intersection of one or more sorted sets and return the members</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zintercard">zintercard</a>(array $keys, int $limit = -1)
        
                                            <p><p>Similar to ZINTER but instead of returning the intersected values, this command returns the
cardinality of the intersected set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zinterstore">zinterstore</a>(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
        
                                            <p><p>Compute the intersection of one ore more sorted sets storing the result in a new sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zscan">zscan</a>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Scan the members of a sorted set incrementally, using a cursor</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zunion">zunion</a>(array $keys, array|null $weights = null, array|null $options = null)
        
                                            <p><p>Retrieve the union of one or more sorted sets</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zunionstore">zunionstore</a>(string $dst, array $keys, array|null $weights = NULL, string|null $aggregate = NULL)
        
                                            <p><p>Perform a union on one or more Redis sets and store the result in a destination sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
            </div>


        <h2>Details</h2>

            <div id="method-details">
                    <div class="method-item">
                    <h3 id="method___construct">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L66">at line 66</a></div>
        <code>                    <a href="Redis.html">Redis</a>
    <strong>__construct</strong>(array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create a new Redis instance.  If passed sufficient information in the
options array it is also possible to connect to an instance at the same
time.</p></p>                <p><p><strong>NOTE</strong>:  Below is an example options array with various setting</p>
<pre><code>$options = [
    'host'           =&gt; 'localhost',
    'port'           =&gt; 6379,
    'readTimeout'    =&gt; 2.5,
    'connectTimeout' =&gt; 2.5,
    'persistent'     =&gt; true,

    // Valid formats: NULL, ['user', 'pass'], 'pass', or ['pass']
    'auth' =&gt; ['phpredis', 'phpredis'],

    // See PHP stream options for valid SSL configuration settings.
    'ssl' =&gt; ['verify_peer' =&gt; false],

    // How quickly to retry a connection after we time out or it  closes.
    // Note that this setting is overridden by 'backoff' strategies.
    'retryInterval'  =&gt; 100,

     // Which backoff algorithm to use.  'decorrelated jitter' is
     // likely the best one for most solution, but there are many
     // to choose from:
     //     REDIS_BACKOFF_ALGORITHM_DEFAULT
     //     REDIS_BACKOFF_ALGORITHM_CONSTANT
     //     REDIS_BACKOFF_ALGORITHM_UNIFORM
     //     REDIS_BACKOFF_ALGORITHM_EXPONENTIAL
     //     REDIS_BACKOFF_ALGORITHM_FULL_JITTER
     //     REDIS_BACKOFF_ALGORITHM_EQUAL_JITTER
     //     REDIS_BACKOFF_ALGORITHM_DECORRELATED_JITTER
     // 'base', and 'cap' are in milliseconds and represent the first
     // delay redis will use when reconnecting, and the maximum delay
     // we will reach while retrying.
    'backoff' =&gt; [
        'algorithm' =&gt; Redis::BACKOFF_ALGORITHM_DECORRELATED_JITTER,
        'base'      =&gt; 500,
        'cap'       =&gt; 750,
    ]
];</code></pre>
<p>Note: If you do wish to connect via the constructor, only 'host' is
strictly required, which will cause PhpRedis to connect to that
host on Redis' default port (6379).</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a></td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_connect">
Redis::connect</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/">https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method___destruct">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L68">at line 68</a></div>
        <code>                    
    <strong>__destruct</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
            
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__compress">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L80">at line 80</a></div>
        <code>                    string
    <strong>_compress</strong>(string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compress a value with the currently configured compressor as set with
Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to be compressed</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The compressed result</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__uncompress">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L92">at line 92</a></div>
        <code>                    string
    <strong>_uncompress</strong>(string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Uncompress the provided argument that has been compressed with the
currently configured compressor as set with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The compressed value to uncompress.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The uncompressed result.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__prefix">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L102">at line 102</a></div>
        <code>                    string
    <strong>_prefix</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prefix the passed argument with the currently set key prefix as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key/string to prefix</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The prefixed string</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__serialize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L114">at line 114</a></div>
        <code>                    string
    <strong>_serialize</strong>(mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Serialize the provided value with the currently set serializer as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to serialize</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The serialized result</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__unserialize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L126">at line 126</a></div>
        <code>                    mixed
    <strong>_unserialize</strong>(string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unserialize the passed argument with the currently set serializer as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to unserialize</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The unserialized result</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__pack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L136">at line 136</a></div>
        <code>                    string
    <strong>_pack</strong>(mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pack the provided value with the configured serializer and compressor
as set with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to pack</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The packed result having been serialized and
compressed.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method__unpack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L146">at line 146</a></div>
        <code>                    mixed
    <strong>_unpack</strong>(string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unpack the provided value with the configured compressor and serializer
as set with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value which has been serialized and compressed.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The uncompressed and eserialized value.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_acl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L148">at line 148</a></div>
        <code>                    mixed
    <strong>acl</strong>(string $subcmd, string ...$args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$subcmd</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_append">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L164">at line 164</a></div>
        <code>                    Redis|int|false
    <strong>append</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append data to a Redis STRING key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The data to append to the key.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new string length of the key or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/append">https://redis.io/commands/append</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;foo&#039;, &#039;hello);<br />
$redis-&gt;append(&#039;foo&#039;, &#039;world&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_auth">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L179">at line 179</a></div>
        <code>                    Redis|bool
    <strong>auth</strong>(mixed $credentials)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Authenticate a Redis connection after its been established.</p></p>                <p><p>$redis-&gt;auth('password');
$redis-&gt;auth(['password']);
$redis-&gt;auth(['username', 'password']);</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$credentials</td>
                <td><p>A string password, or an array with one or two string elements.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the AUTH was successful.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/auth">https://redis.io/commands/auth</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bgSave">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L188">at line 188</a></div>
        <code>                    Redis|bool
    <strong>bgSave</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a save of the Redis database in the background.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the command was successful.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bgsave">https://redis.io/commands/bgsave</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bgrewriteaof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L197">at line 197</a></div>
        <code>                    Redis|bool
    <strong>bgrewriteaof</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Asynchronously rewrite Redis' append-only file</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the command was successful.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bgrewriteaof">https://redis.io/commands/bgrewriteaof</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bitcount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L216">at line 216</a></div>
        <code>                    Redis|int|false
    <strong>bitcount</strong>(string $key, int $start = 0, int $end = -1, bool $bybit = false)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of set bits in a Redis string.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question (must be a string key)</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The index where Redis should start counting.  If omitted it
defaults to zero, which means the start of the string.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The index where Redis should stop counting.  If omitted it
defaults to -1, meaning the very end of the string.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bybit</td>
                <td><p>Whether or not Redis should treat $start and $end as bit
positions, rather than bytes.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of bits set in the requested range.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bitcount/">https://redis.io/commands/bitcount/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bitop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L218">at line 218</a></div>
        <code>                    Redis|int|false
    <strong>bitop</strong>(string $operation, string $deskey, string $srckey, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$deskey</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bitpos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L234">at line 234</a></div>
        <code>                    Redis|int|false
    <strong>bitpos</strong>(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the position of the first bit set to 0 or 1 in a string.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check (must be a string)</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bit</td>
                <td><p>Whether to look for an unset (0) or set (1) bit.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>Where in the string to start looking.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>Where in the string to stop looking.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bybit</td>
                <td><p>If true, Redis will treat $start and $end as BIT values and not bytes, so if start
was 0 and end was 2, Redis would only search the first two bits.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The position of the first set or unset bit.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bitpos/">https://redis.io/commands/bitpos/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_blPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L254">at line 254</a></div>
        <code>                    Redis|array|null|false
    <strong>blPop</strong>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element off the beginning of a Redis list or lists, potentially blocking up to a specified
timeout.  This method may be called in two distinct ways, of which examples are provided below.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key_or_keys</td>
                <td><p>This can either be a string key or an array of one or more
keys.</p></td>
            </tr>
                    <tr>
                <td>string|float|int</td>
                <td>$timeout_or_key</td>
                <td><p>If the previous argument was a string key, this can either
be an additional key, or the timeout you wish to send to
the command.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>Can return various things depending on command and data in Redis.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/blpop/">https://redis.io/commands/blpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;blPop(&#039;list1&#039;, &#039;list2&#039;, &#039;list3&#039;, 1.5);<br />
$relay-&gt;blPop([&#039;list1&#039;, &#039;list2&#039;, &#039;list3&#039;], 1.5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_brPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L264">at line 264</a></div>
        <code>                    Redis|array|null|false
    <strong>brPop</strong>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element off of the end of a Redis list or lists, potentially blocking up to a specified timeout.</p></p>                <p><p>The calling convention is identical to Redis::blPop() so see that documentation for more details.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key_or_keys</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|float|int</td>
                <td>$timeout_or_key</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/brpop/">https://redis.io/commands/brpop/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_blPop">
Redis::blPop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_brpoplpush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L278">at line 278</a></div>
        <code>                    Redis|string|false
    <strong>brpoplpush</strong>(string $src, string $dst, int|float $timeout)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element from the end of a Redis list, pushing it to the beginning of another Redis list,
optionally blocking up to a specified timeout.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination list</p></td>
            </tr>
                    <tr>
                <td>int|float</td>
                <td>$timeout</td>
                <td><p>The number of seconds to wait.  Note that you must be connected
to Redis &gt;= 6.0.0 to send a floating point timeout.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/brpoplpush/">https://redis.io/commands/brpoplpush/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bzPopMax">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L304">at line 304</a></div>
        <code>                    Redis|array|false
    <strong>bzPopMax</strong>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP the maximum scoring element off of one or more sorted sets, blocking up to a specified
timeout if no elements are available.</p></p>                <p><p>Following are examples of the two main ways to call this method.</p>
<p><strong>NOTE</strong>:  We recommend calling this function with an array and a timeout as the other strategy
may be deprecated in future versions of PhpRedis</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$timeout_or_key</td>
                <td><p>If the previous argument was an array, this argument
must be a timeout value.  Otherwise it could also be
another key.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td><p>Can consist of additional keys, until the last argument
which needs to be a timeout.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The popped elements.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bzpopmax">https://redis.io/commands/bzpopmax</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bzPopMax(&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;, 1.5);<br />
$redis-&gt;bzPopMax([&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;], 1.5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bzPopMin">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L316">at line 316</a></div>
        <code>                    Redis|array|false
    <strong>bzPopMin</strong>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP the minimum scoring element off of one or more sorted sets, blocking up to a specified timeout
if no elements are available</p></p>                <p><p>This command is identical in semantics to bzPopMax so please see that method for more information.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$timeout_or_key</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/bzpopmin">https://redis.io/commands/bzpopmin</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_bzPopMax">
Redis::bzPopMax</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_bzmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L335">at line 335</a></div>
        <code>                    Redis|array|null|false
    <strong>bzmpop</strong>(float $timeout, array $keys, string $from, int $count = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP one or more elements from one or more sorted sets, blocking up to a specified amount of time
when no elements are available.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>How long to block if there are no element available</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>The sorted sets to pop from</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you wish to
pop the lowest or highest scoring members from the set(s).</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>This function will return an array of popped elements, or false
depending on whether any elements could be popped within the
specified timeout.</p>
<p>NOTE:  If Redis::OPT_NULL_MULTIBULK_AS_NULL is set to true via Redis::setOption(), this method will
instead return NULL when Redis doesn't pop any elements.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L349">at line 349</a></div>
        <code>                    Redis|array|null|false
    <strong>zmpop</strong>(array $keys, string $from, int $count = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP one or more of the highest or lowest scoring elements from one or more sorted sets.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted sets</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you want to
pop the lowest or highest scoring elements.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements at once.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>An array of popped elements or false if none could be popped.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zmpop">https://redis.io/commands/zmpop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_blmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L366">at line 366</a></div>
        <code>                    Redis|array|null|false
    <strong>blmpop</strong>(float $timeout, array $keys, string $from, int $count = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements from one or more Redis LISTs, blocking up to a specified timeout when
no elements are available.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>The number of seconds Redis will block when no elements are available.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more Redis LISTs to pop from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether
to pop elements from the beginning or end of the LISTs.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements at once.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>One or more elements popped from the list(s) or false if all LISTs
were empty.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/blmpop">https://redis.io/commands/blmpop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L382">at line 382</a></div>
        <code>                    Redis|array|null|false
    <strong>lmpop</strong>(array $keys, string $from, int $count = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements off of one or more Redis LISTs.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>An array with one or more Redis LIST key names.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether to pop\
elements from the beginning or end of the LISTs.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The maximum number of elements to pop at once.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>One or more elements popped from the LIST(s) or false if all the LISTs
were empty.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lmpop">https://redis.io/commands/lmpop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_clearLastError">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L398">at line 398</a></div>
        <code>                    bool
    <strong>clearLastError</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Reset any last error on the connection to NULL</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>This should always return true or throw an exception if we're not connected.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_getLastError">
Redis::getLastError</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
$redis-&gt;set(&#039;string&#039;, &#039;this_is_a_string&#039;);<br />
$redis-&gt;smembers(&#039;string&#039;);<br />
var_dump($redis-&gt;getLastError());<br />
$redis-&gt;clearLastError();<br />
var_dump($redis-&gt;getLastError());</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_client">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L400">at line 400</a></div>
        <code>                    mixed
    <strong>client</strong>(string $opt, mixed ...$args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$opt</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_close">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L402">at line 402</a></div>
        <code>                    bool
    <strong>close</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_command">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L404">at line 404</a></div>
        <code>                    mixed
    <strong>command</strong>(string $opt = null, string|array $arg)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$opt</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|array</td>
                <td>$arg</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_config">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L423">at line 423</a></div>
        <code>                    mixed
    <strong>config</strong>(string $operation, array|string|null $key_or_settings = NULL, string|null $value = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute the Redis CONFIG command in a variety of ways.</p></p>                <p><p>What the command does in particular depends on the <code>$operation</code> qualifier.
Operations that PhpRedis supports are: RESETSTAT, REWRITE, GET, and SET.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The CONFIG operation to execute (e.g. GET, SET, REWRITE).</p></td>
            </tr>
                    <tr>
                <td>array|string|null</td>
                <td>$key_or_settings</td>
                <td><p>One or more keys or values.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$value</td>
                <td><p>The value if this is a <code>CONFIG SET</code> operation.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/config">https://redis.io/commands/config</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;config(&#039;GET&#039;, &#039;timeout&#039;);<br />
$redis-&gt;config(&#039;GET&#039;, [&#039;timeout&#039;, &#039;databases&#039;]);<br />
$redis-&gt;config(&#039;SET&#039;, &#039;timeout&#039;, 30);<br />
$redis-&gt;config(&#039;SET&#039;, [&#039;timeout&#039; =&gt; 30, &#039;loglevel&#039; =&gt; &#039;warning&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_connect">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L425">at line 425</a></div>
        <code>                    bool
    <strong>connect</strong>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array $context = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_copy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L461">at line 461</a></div>
        <code>                    Redis|bool
    <strong>copy</strong>(string $src, string $dst, array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Make a copy of a key.</p></p>                <p><p>$redis = new Redis(['host' =&gt; 'localhost']);</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The key to copy</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The name of the new key created from the source key.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array with modifiers on how COPY should operate.</p>
<pre><code>$options = [
    'REPLACE' =&gt; true|false # Whether to replace an existing key.
    'DB' =&gt; int             # Copy key to specific db.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the copy was completed and false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/copy">https://redis.io/commands/copy</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()<br />
      -&gt;select(1)<br />
      -&gt;del(&#039;newkey&#039;)<br />
      -&gt;select(0)<br />
      -&gt;del(&#039;newkey&#039;)<br />
      -&gt;mset([&#039;source1&#039; =&gt; &#039;value1&#039;, &#039;exists&#039; =&gt; &#039;old_value&#039;])<br />
      -&gt;exec();<br />
<br />
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;newkey&#039;));<br />
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;newkey&#039;, [&#039;db&#039; =&gt; 1]));<br />
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;exists&#039;));<br />
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;exists&#039;, [&#039;REPLACE&#039; =&gt; true]));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_dbSize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L478">at line 478</a></div>
        <code>                    Redis|int|false
    <strong>dbSize</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the number of keys in the currently selected Redis database.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/dbsize">https://redis.io/commands/dbsize</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
$redis-&gt;flushdb();<br />
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);<br />
var_dump($redis-&gt;dbsize());<br />
$redis-&gt;mset([&#039;a&#039; =&gt; &#039;a&#039;, &#039;b&#039; =&gt; &#039;b&#039;, &#039;c&#039; =&gt; &#039;c&#039;, &#039;d&#039; =&gt; &#039;d&#039;]);<br />
var_dump($redis-&gt;dbsize());</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_debug">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L480">at line 480</a></div>
        <code>                    Redis|string
    <strong>debug</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_decr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L499">at line 499</a></div>
        <code>                    Redis|int|false
    <strong>decr</strong>(string $key, int $by = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Decrement a Redis integer by 1 or a provided value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to decrement</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$by</td>
                <td><p>How much to decrement the key.  Note that if this value is
not sent or is set to <code>1</code>, PhpRedis will actually invoke
the 'DECR' command.  If it is any value other than <code>1</code>
PhpRedis will actually send the <code>DECRBY</code> command.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/decr">https://redis.io/commands/decr</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/decrby">https://redis.io/commands/decrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;decr(&#039;counter&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;decr(&#039;counter&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_decrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L514">at line 514</a></div>
        <code>                    Redis|int|false
    <strong>decrBy</strong>(string $key, int $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Decrement a redis integer by a value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The integer key to decrement.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>How much to decrement the key.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/decrby">https://redis.io/commands/decrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;decrby(&#039;counter&#039;, 1);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;decrby(&#039;counter&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_del">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L534">at line 534</a></div>
        <code>                    Redis|int|false
    <strong>del</strong>(array|string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete one or more keys from Redis.</p></p>                <p><p>This method can be called in two distinct ways.  The first is to pass a single array
of keys to delete, and the second is to pass N arguments, all names of keys.  See
below for an example of both strategies.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional keys passed in a variadic fashion.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys that were deleted</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/del">https://redis.io/commands/del</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;key:0&#039;, &#039;key:1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;del([&#039;key:2&#039;, &#039;key:3&#039;, &#039;key:4&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_delete">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L540">at line 540</a></div>
        <code>                    Redis|int|false
    <strong>delete</strong>(array|string $key, string ...$other_keys)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_discard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L553">at line 553</a></div>
        <code>                    Redis|bool
    <strong>discard</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Discard a transaction currently in progress.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if we could discard the transaction.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getMode();<br />
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);<br />
$redis-&gt;discard();<br />
$redis-&gt;getMode();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_dump">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L572">at line 572</a></div>
        <code>                    Redis|string
    <strong>dump</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Dump Redis' internal binary representation of a key.</p></p>                <p><p>$redis-&gt;zRange('new-zset', 0, -1, true);</p>
<pre><code></code></pre></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to dump.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string</td>
            <td><p>A binary string representing the key's value.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/dump">https://redis.io/commands/dump</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;zset&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;);<br />
$binary = $redis-&gt;dump(&#039;zset&#039;);<br />
$redis-&gt;restore(&#039;new-zset&#039;, 0, $binary);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_echo">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L585">at line 585</a></div>
        <code>                    Redis|string|false
    <strong>echo</strong>(string $str)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Have Redis repeat back an arbitrary string to the client.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$str</td>
                <td><p>The string to echo</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The string sent to Redis or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/echo">https://redis.io/commands/echo</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;echo(&#039;Hello, World&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_eval">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L601">at line 601</a></div>
        <code>                    mixed
    <strong>eval</strong>(string $script, array $args = [], int $num_keys = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a LUA script on the redis server.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$script</td>
                <td><p>A string containing the LUA script</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>An array of arguments to pass to this script</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td><p>How many of the arguments are keys.  This is needed
as redis distinguishes between key name arguments
and other data.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>LUA scripts may return arbitrary data so this method can return
strings, arrays, nested arrays, etc.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/eval/">https://redis.io/commands/eval/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_eval_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L609">at line 609</a></div>
        <code>                    mixed
    <strong>eval_ro</strong>(string $script_sha, array $args = [], int $num_keys = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply the read-only variant of eval, meaning the underlying script
may not modify data in redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$script_sha</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_eval_ro">
Redis::eval_ro</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_evalsha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L628">at line 628</a></div>
        <code>                    mixed
    <strong>evalsha</strong>(string $sha1, array $args = [], int $num_keys = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a LUA script on the server but instead of sending the script, send
the SHA1 hash of the script.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$sha1</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>Arguments to send to the script.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td><p>The number of arguments that are keys</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Returns whatever the specific script does.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/evalsha/">https://redis.io/commands/evalsha/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_eval">
Redis::eval</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_evalsha_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L636">at line 636</a></div>
        <code>                    mixed
    <strong>evalsha_ro</strong>(string $sha1, array $args = [], int $num_keys = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply the read-only variant of evalsha, meaning the underlying script
may not modify data in redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$sha1</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_evalsha">
Redis::evalsha</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_exec">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L656">at line 656</a></div>
        <code>                    Redis|array|false
    <strong>exec</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute either a MULTI or PIPELINE block and return the array of replies.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The array of pipeline'd or multi replies or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/exec">https://redis.io/commands/exec</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/multi">https://redis.io/commands/multi</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_pipeline">
Redis::pipeline</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_multi">
Redis::multi</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$res = $redis-&gt;multi()<br />
-&gt;set(&#039;foo&#039;, &#039;bar&#039;)<br />
-&gt;get(&#039;foo&#039;)<br />
-&gt;del(&#039;list&#039;)<br />
-&gt;rpush(&#039;list&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;)<br />
-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_exists">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L672">at line 672</a></div>
        <code>                    Redis|int|bool
    <strong>exists</strong>(mixed $key, mixed ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Test if one or more keys exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$key</td>
                <td><p>Either an array of keys or a string key</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_keys</td>
                <td><p>If the previous argument was a string, you may send any number of
additional keys to test.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|bool</td>
            <td><p>The number of keys that do exist and false on failure</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/exists">https://redis.io/commands/exists</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;exists([&#039;k1&#039;, &#039;k2&#039;, &#039;k3&#039;]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;exists(&#039;k4&#039;, &#039;k5&#039;, &#039;notakey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_expire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L693">at line 693</a></div>
        <code>                    Redis|bool
    <strong>expire</strong>(string $key, int $timeout, string|null $mode = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets an expiration in seconds on the key in question.  If connected to
redis-server &gt;= 7.0.0 you may send an additional &quot;mode&quot; argument which
modifies how the command will execute.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>A two character modifier that changes how the
command works.</p>
<pre><code>NX - Set expiry only if key has no expiry
XX - Set expiry only if key has an expiry
LT - Set expiry only when new expiry is &lt; current expiry
GT - Set expiry only when new expiry is &gt; current expiry</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if an expiration was set and false otherwise.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/expire">https://redis.io/commands/expire</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_expireAt">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L719">at line 719</a></div>
        <code>                    Redis|bool
    <strong>expireAt</strong>(string $key, int $timestamp, string|null $mode = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key to expire at an exact unix timestamp.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timestamp</td>
                <td><p>The unix timestamp to expire at.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An option 'mode' that modifies how the command acts (see <a href="Redis.html#method_expire">Redis::expire</a>).</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if an expiration was set, false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/expireat">https://redis.io/commands/expireat</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/expire">https://redis.io/commands/expire</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_expire">
Redis::expire</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_failover">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L721">at line 721</a></div>
        <code>                    Redis|bool
    <strong>failover</strong>(array|null $to = null, bool $abort = false, int $timeout = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|null</td>
                <td>$to</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$abort</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_expiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L737">at line 737</a></div>
        <code>                    Redis|int|false
    <strong>expiretime</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration of a given key as a unix timestamp</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The timestamp when the key expires, or -1 if the key has no expiry
and -2 if the key doesn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/expiretime">https://redis.io/commands/expiretime</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setEx(&#039;mykey&#039;, 60, &#039;myval&#039;);<br />
$redis-&gt;expiretime(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pexpiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L750">at line 750</a></div>
        <code>                    Redis|int|false
    <strong>pexpiretime</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration timestamp of a given Redis key but in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The expiration timestamp of this key (in milliseconds) or -1 if the
key has no expiration, and -2 if it does not exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/pexpiretime">https://redis.io/commands/pexpiretime</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_expiretime">
Redis::expiretime</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_flushAll">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L760">at line 760</a></div>
        <code>                    Redis|bool
    <strong>flushAll</strong>(bool|null $sync = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Deletes every key in all Redis databases</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>bool|null</td>
                <td>$sync</td>
                <td><p>Whether to perform the task in a blocking or non-blocking way.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/flushall">https://redis.io/commands/flushall</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_flushDB">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L770">at line 770</a></div>
        <code>                    Redis|bool
    <strong>flushDB</strong>(bool|null $sync = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Deletes all the keys of the currently selected database.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>bool|null</td>
                <td>$sync</td>
                <td><p>Whether to perform the task in a blocking or non-blocking way.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/flushdb">https://redis.io/commands/flushdb</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geoadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L791">at line 791</a></div>
        <code>                    Redis|int|false
    <strong>geoadd</strong>(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more members to a geospacial sorted set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to add data to.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td><p>The longitude of the first member</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td><p>The latitude of the first member.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_triples_and_options</td>
                <td><p>You can continue to pass longitude, latitude, and member
arguments to add as many members as you wish.  Optionally, the final argument may be
a string with options for the command <a href="Redis.html">Redis</a> documentation for the options.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of added elements is returned.  If the 'CH' option is specified,
the return value is the number of members <em>changed</em>.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/geoadd">https://redis.io/commands/geoadd</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geoAdd(&#039;cities&#039;, -121.8374, 39.7284, &#039;Chico&#039;, -122.03218, 37.322, &#039;Cupertino&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;geoadd(&#039;cities&#039;, -121.837478, 39.728494, &#039;Chico&#039;, [&#039;XX&#039;, &#039;CH&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geodist">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L814">at line 814</a></div>
        <code>                    Redis|float|false
    <strong>geodist</strong>(string $key, string $src, string $dst, string|null $unit = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the distance between two members of a geospacially encoded sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The first member.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The second member.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$unit</td>
                <td><p>Which unit to use when computing distance, defaulting to meters.</p>
<pre><code>M  - meters
KM - kilometers
FT - feet
MI - miles</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The calculated distance in whichever units were specified or false
if one or both members did not exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/geodist">https://redis.io/commands/geodist</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geodist(&#039;cities&#039;, &#039;Chico&#039;, &#039;Cupertino&#039;, &#039;mi&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geohash">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L830">at line 830</a></div>
        <code>                    Redis|array|false
    <strong>geohash</strong>(string $key, string $member, string ...$other_members)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more GeoHash encoded strings for members of the set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first member to request</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>One or more additional members to request.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of GeoHash encoded values.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/geohash">https://redis.io/commands/geohash</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://en.wikipedia.org/wiki/Geohash">https://en.wikipedia.org/wiki/Geohash</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geohash(&#039;cities&#039;, &#039;Chico&#039;, &#039;Cupertino&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geopos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L845">at line 845</a></div>
        <code>                    Redis|array|false
    <strong>geopos</strong>(string $key, string $member, string ...$other_members)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the longitude and latitude for one or more members of a geospacially encoded sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first member to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>One or more members to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>array of longitude and latitude pairs.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/geopos">https://redis.io/commands/geopos</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geopos(&#039;cities&#039;, &#039;Seattle&#039;, &#039;New York&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_georadius">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L882">at line 882</a></div>
        <code>                    mixed
    <strong>georadius</strong>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve members of a geospacially sorted set that are within a certain radius of a location.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td><p>The longitude of the location to query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td><p>The latitude of the location to query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td><p>The radius of the area to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of the provided radius (defaults to 'meters).
See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array of options that modifies how the command behaves.</p>
<pre><code>$options = [
    'WITHCOORD',     # Return members and their coordinates.
    'WITHDIST',      # Return members and their distances from the center.
    'WITHHASH',      # Return members GeoHash string.
    'ASC' | 'DESC',  # The sort order of returned members

    # Limit to N returned members.  Optionally a two element array may be
    # passed as the `LIMIT` argument, and the `ANY` argument.
    'COUNT' =&gt; [&lt;int&gt;], or [&lt;int&gt;, &lt;bool&gt;]

    # Instead of returning members, store them in the specified key.
    'STORE' =&gt; &lt;string&gt;

    # Store the distances in the specified key
    'STOREDIST' =&gt; &lt;string&gt;
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return various things, depending on the options passed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/georadius">https://redis.io/commands/georadius</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadius(&#039;cities&#039;, 47.608013, -122.335167, 1000, &#039;km&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_georadius_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L889">at line 889</a></div>
        <code>                    mixed
    <strong>georadius_ro</strong>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>A readonly variant of <code>GEORADIUS</code> that may be executed on replicas.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            Redis::georadius
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_georadiusbymember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L906">at line 906</a></div>
        <code>                    mixed
    <strong>georadiusbymember</strong>(string $key, string $member, float $radius, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Similar to <code>GEORADIUS</code> except it uses a member as the center of the query.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The member to treat as the center of the query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td><p>The radius from the member to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of the provided radius
See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array with various options to modify the command's behavior.
See <a href="Redis.html#method_georadius">Redis::georadius</a> for options.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return various things depending on options.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadiusbymember(&#039;cities&#039;, &#039;Seattle&#039;, 200, &#039;mi&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_georadiusbymember_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L911">at line 911</a></div>
        <code>                    mixed
    <strong>georadiusbymember_ro</strong>(string $key, string $member, float $radius, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is the read-only variant of <code>GEORADIUSBYMEMBER</code> that can be run on replicas.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geosearch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L926">at line 926</a></div>
        <code>                    array
    <strong>geosearch</strong>(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Search a geospacial sorted set for members in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>array|string</td>
                <td>$position</td>
                <td><p>Either a two element array with longitude and latitude, or
a string representing a member of the set.</p></td>
            </tr>
                    <tr>
                <td>array|int|float</td>
                <td>$shape</td>
                <td><p>Either a number representine the radius of a circle to search, or
a two element array representing the width and height of a box
to search.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of our shape.  See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p><a href="Redis.html#method_georadius">Redis::georadius</a> for options.  Note that the <code>STORE</code>
options are not allowed for this command.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_geosearchstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L952">at line 952</a></div>
        <code>                    Redis|array|int|false
    <strong>geosearchstore</strong>(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Search a geospacial sorted set for members within a given area or range, storing the results into
a new set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination where results will be stored.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>array|string</td>
                <td>$position</td>
                <td><p>Either a two element array with longitude and latitude, or
a string representing a member of the set.</p></td>
            </tr>
                    <tr>
                <td>array|int|float</td>
                <td>$shape</td>
                <td><p>Either a number representine the radius of a circle to search, or
a two element array representing the width and height of a box
to search.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of our shape.  See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><pre><code>$options = [
    'ASC' | 'DESC',  # The sort order of returned members
    'WITHDIST'       # Also store distances.

    # Limit to N returned members.  Optionally a two element array may be
    # passed as the `LIMIT` argument, and the `ANY` argument.
    'COUNT' =&gt; [&lt;int&gt;], or [&lt;int&gt;, &lt;bool&gt;]
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_get">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L964">at line 964</a></div>
        <code>                    mixed
    <strong>get</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a string keys value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The keys value or false if it did not exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/get">https://redis.io/commands/get</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;get(&#039;foo&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getAuth">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L973">at line 973</a></div>
        <code>                    mixed
    <strong>getAuth</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the authentication information on the connection, if any.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The authentication information used to authenticate the connection.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_auth">
Redis::auth</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getBit">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L985">at line 985</a></div>
        <code>                    Redis|int|false
    <strong>getBit</strong>(string $key, int $idx)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the bit at a given index in a string key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$idx</td>
                <td><p>The Nth bit that we want to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/getbit">https://redis.io/commands/getbit</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getbit(&#039;bitmap&#039;, 1337);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getEx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1008">at line 1008</a></div>
        <code>                    Redis|string|bool
    <strong>getEx</strong>(string $key, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the value of a key and optionally set it's expiration.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>Options to modify how the command works.</p>
<pre><code>$options = [
    'EX'     =&gt; &lt;seconds&gt;      # Expire in N seconds
    'PX'     =&gt; &lt;milliseconds&gt; # Expire in N milliseconds
    'EXAT'   =&gt; &lt;timestamp&gt;    # Expire at a unix timestamp (in seconds)
    'PXAT'   =&gt; &lt;mstimestamp&gt;  # Expire at a unix timestamp (in milliseconds);
    'PERSIST'                  # Remove any configured expiration on the key.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>The key's value or false if it didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/comands/getex">https://redis.io/comands/getex</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getEx(&#039;mykey&#039;, [&#039;EX&#039; =&gt; 60]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getDBNum">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1020">at line 1020</a></div>
        <code>                    int
    <strong>getDBNum</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the database number PhpRedis thinks we're connected to.</p></p>                <p><p>This value is updated internally in PhpRedis each time <a href="Redis.html#method_select">Redis::select</a> is called.</p></p>        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>database we're connected to.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_select">
Redis::select</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/select">https://redis.io/commands/select</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getDel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1032">at line 1032</a></div>
        <code>                    Redis|string|bool
    <strong>getDel</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a key from Redis and delete it in an atomic operation.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to get/delete.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>The value of the key or false if it didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/getdel">https://redis.io/commands/getdel</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getdel(&#039;token:123&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getHost">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1039">at line 1039</a></div>
        <code>                    string
    <strong>getHost</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the host or Unix socket we are connected to.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The host or Unix socket.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getLastError">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1046">at line 1046</a></div>
        <code>                    string|null
    <strong>getLastError</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the last error returned to us from Redis, if any.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string|null</td>
            <td><p>The error string or NULL if there is none.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getMode">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1054">at line 1054</a></div>
        <code>                    int
    <strong>getMode</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Returns whether the connection is in ATOMIC, MULTI, or PIPELINE mode</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The mode we're in.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getOption">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1063">at line 1063</a></div>
        <code>                    mixed
    <strong>getOption</strong>(int $option)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the value of a configuration setting as set by Redis::setOption()</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$option</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The setting itself or false on failure</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td>for a detailed list of options and their values.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getPersistentID">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1070">at line 1070</a></div>
        <code>                    string|null
    <strong>getPersistentID</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the persistent connection ID, if there is one.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>string|null</td>
            <td><p>The ID or NULL if we don't have one.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getPort">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1077">at line 1077</a></div>
        <code>                    int
    <strong>getPort</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the port we are connected to.  This number will be zero if we are connected to a unix socket.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The port.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1094">at line 1094</a></div>
        <code>                    Redis|string|false
    <strong>getRange</strong>(string $key, int $start, int $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a substring of a string by index.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The string to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The zero-based starting index.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The zero-based ending index.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The substring or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/getrange">https://redis.io/commands/getrange</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;silly-word&#039;, &#039;Supercalifragilisticexpialidocious&#039;);<br />
echo $redis-&gt;getRange(&#039;silly-word&#039;, 0, 4) . &quot;\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lcs">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1127">at line 1127</a></div>
        <code>                    Redis|string|array|int|false
    <strong>lcs</strong>(string $key1, string $key2, array|null $options = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the longest common subsequence between two string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key1</td>
                <td><p>The first key to check</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key2</td>
                <td><p>The second key to check</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An optional array of modifiers for the command.</p>
<pre><code>$options = [
    'MINMATCHLEN'  =&gt; int  # Exclude matching substrings that are less than this value

    'WITHMATCHLEN' =&gt; bool # Whether each match should also include its length.

    'LEN'                  # Return the length of the longest subsequence

    'IDX'                  # Each returned match will include the indexes where the
                           # match occurs in each string.
];</code></pre>
<p>NOTE:  'LEN' cannot be used with 'IDX'.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|int|false</td>
            <td><p>Various reply types depending on options.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lcs">https://redis.io/commands/lcs</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;seq1&#039;, &#039;gtaggcccgcacggtctttaatgtatccctgtttaccatgccatacctgagcgcatacgc&#039;);<br />
$redis-&gt;set(&#039;seq2&#039;, &#039;aactcggcgcgagtaccaggccaaggtcgttccagagcaaagactcgtgccccgctgagc&#039;);<br />
echo $redis-&gt;lcs(&#039;seq1&#039;, &#039;seq2&#039;) . &quot;\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getReadTimeout">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1134">at line 1134</a></div>
        <code>                    float
    <strong>getReadTimeout</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the currently set read timeout on the connection.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>float</td>
            <td><p>The timeout.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1150">at line 1150</a></div>
        <code>                    Redis|string|false
    <strong>getset</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets a key and returns any previously set value, if the key already existed.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The old value of the key or false if it didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/getset">https://redis.io/commands/getset</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getset(&#039;captain&#039;, &#039;Pike&#039;);<br />
$redis-&gt;getset(&#039;captain&#039;, &#039;Kirk&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getTimeout">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1157">at line 1157</a></div>
        <code>                    float|false
    <strong>getTimeout</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve any set connection timeout</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>float|false</td>
            <td><p>The currently set timeout or false on failure (e.g. we aren't connected).</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_getTransferredBytes">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1159">at line 1159</a></div>
        <code>                    int|false
    <strong>getTransferredBytes</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hDel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1174">at line 1174</a></div>
        <code>                    Redis|int|false
    <strong>hDel</strong>(string $key, string $field, string ...$other_fields)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more fields from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash key in question.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The first field to remove</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_fields</td>
                <td><p>One or more additional fields to remove.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of fields actually removed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hdel">https://redis.io/commands/hdel</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hDel(&#039;communication&#039;, &#039;Alice&#039;, &#039;Bob&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hExists">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1188">at line 1188</a></div>
        <code>                    Redis|bool
    <strong>hExists</strong>(string $key, string $field)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Checks whether a field exists in a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to check</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if it exists, false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hexists">https://redis.io/commands/hexists</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hExists(&#039;communication&#039;, &#039;Alice&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hGet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1190">at line 1190</a></div>
        <code>                    mixed
    <strong>hGet</strong>(string $key, string $member)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hGetAll">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1202">at line 1202</a></div>
        <code>                    Redis|array|false
    <strong>hGetAll</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Read every field and value from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All fields and values or false if the key didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hgetall">https://redis.io/commands/hgetall</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hgetall(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hIncrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1220">at line 1220</a></div>
        <code>                    Redis|int|false
    <strong>hIncrBy</strong>(string $key, string $field, int $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a hash field's value by an integer</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to modify</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to increment</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>How much to increment the value.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the field.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hincrby">https://redis.io/commands/hincrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hMSet(&#039;player:1&#039;, [&#039;name&#039; =&gt; &#039;Alice&#039;, &#039;score&#039; =&gt; 0]);<br />
$redis-&gt;hincrby(&#039;player:1&#039;, &#039;score&#039;, 10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hIncrByFloat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1235">at line 1235</a></div>
        <code>                    Redis|float|false
    <strong>hIncrByFloat</strong>(string $key, string $field, float $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a hash field by a floating point value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash with the field to increment.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to increment.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The field value after incremented.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hincrbyfloat">https://redis.io/commands/hincrbyfloat</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hincrbyfloat(&#039;numbers&#039;, &#039;tau&#039;, 2 * 3.1415926);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hKeys">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1248">at line 1248</a></div>
        <code>                    Redis|array|false
    <strong>hKeys</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve all of the fields of a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The fields in the hash or false if the hash doesn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hkeys">https://redis.io/commands/hkeys</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hkeys(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1261">at line 1261</a></div>
        <code>                    Redis|int|false
    <strong>hLen</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the number of fields in a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of fields or false if the key didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hlen">https://redis.io/commands/hlen</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hlen(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hMget">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1275">at line 1275</a></div>
        <code>                    Redis|array|false
    <strong>hMget</strong>(string $key, array $fields)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more fields from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>One or more fields to query in the hash.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The fields and values or false if the key didn't exist.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hmget">https://redis.io/commands/hmget</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hMGet(&#039;player:1&#039;, [&#039;name&#039;, &#039;score&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hMset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1289">at line 1289</a></div>
        <code>                    Redis|bool
    <strong>hMset</strong>(string $key, array $fieldvals)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add or update one or more hash fields and values</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to create/update</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fieldvals</td>
                <td><p>An associative array with fields and their values.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the operation was successful</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hmset">https://redis.io/commands/hmset</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hmset(&#039;updates&#039;, [&#039;status&#039; =&gt; &#039;starting&#039;, &#039;elapsed&#039; =&gt; 0]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hRandField">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1311">at line 1311</a></div>
        <code>                    Redis|string|array
    <strong>hRandField</strong>(string $key, array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more random field from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array of options to modify how the command behaves.</p>
<pre><code>$options = [
    'COUNT'      =&gt; int  # An optional number of fields to return.
    'WITHVALUES' =&gt; bool # Also return the field values.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|array</td>
            <td><p>One or more random fields (and possibly values).</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hrandfield">https://redis.io/commands/hrandfield</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hrandfield(&#039;settings&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;hrandfield(&#039;settings&#039;, [&#039;count&#039; =&gt; 2, &#039;withvalues&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hSet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1313">at line 1313</a></div>
        <code>                    Redis|int|false
    <strong>hSet</strong>(string $key, string $member, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hSetNx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1329">at line 1329</a></div>
        <code>                    Redis|bool
    <strong>hSetNx</strong>(string $key, string $field, string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a hash field and value, but only if that field does not exist</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The value to set.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the field was set and false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hsetnx">https://redis.io/commands/hsetnx</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hsetnx(&#039;player:1&#039;, &#039;lock&#039;, &#039;enabled&#039;);<br />
$redis-&gt;hsetnx(&#039;player:1&#039;, &#039;lock&#039;, &#039;enabled&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hStrLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1347">at line 1347</a></div>
        <code>                    Redis|int|false
    <strong>hStrLen</strong>(string $key, string $field)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the string length of a hash field</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The string length of the field or false.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hstrlen">https://redis.io/commands/hstrlen</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
$redis-&gt;del(&#039;hash&#039;);<br />
$redis-&gt;hmset(&#039;hash&#039;, [&#039;50bytes&#039; =&gt; str_repeat(&#039;a&#039;, 50)]);<br />
$redis-&gt;hstrlen(&#039;hash&#039;, &#039;50bytes&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hVals">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1360">at line 1360</a></div>
        <code>                    Redis|array|false
    <strong>hVals</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get all of the values from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The values from the hash.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hvals">https://redis.io/commands/hvals</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hvals(&#039;player:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_hscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1400">at line 1400</a></div>
        <code>                    Redis|array|bool
    <strong>hscan</strong>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Iterate over the fields and values of a hash in an incremental fashion.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>int|null</td>
                <td>$iterator</td>
                <td><p>The scan iterator, which should be initialized to NULL before the first call.
This value will be updated after every call to hscan, until it reaches zero
meaning the scan is complete.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern to filter fields with.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional hint to Redis about how many fields and values to return per HSCAN.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array with a subset of fields and values.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/hscan">https://redis.io/commands/hscan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/scan">https://redis.io/commands/scan</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
<br />
$redis-&gt;del(&#039;big-hash&#039;);<br />
<br />
for ($i = 0; $i &lt; 1000; $i++) {<br />
    $fields[&quot;field:$i&quot;] = &quot;value:$i&quot;;<br />
}<br />
<br />
$redis-&gt;hmset(&#039;big-hash&#039;, $fields);<br />
<br />
$it = NULL;<br />
<br />
do {<br />
    // Scan the hash but limit it to fields that match &#039;*:1?3&#039;<br />
    $fields = $redis-&gt;hscan(&#039;big-hash&#039;, $it, &#039;*:1?3&#039;);<br />
<br />
    foreach ($fields as $field =&gt; $value) {<br />
        echo &quot;[$field] =&gt; $value\n&quot;;<br />
    }<br />
} while ($it != 0);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_incr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1416">at line 1416</a></div>
        <code>                    Redis|int|false
    <strong>incr</strong>(string $key, int $by = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a key's value, optionally by a specific amount.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$by</td>
                <td><p>An optional amount to increment by.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key after incremented.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/incr">https://redis.io/commands/incr</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/incrby">https://redis.io/commands/incrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;incr(&#039;mycounter&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;incr(&#039;mycounter&#039;, 10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_incrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1433">at line 1433</a></div>
        <code>                    Redis|int|false
    <strong>incrBy</strong>(string $key, int $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a key by a specific integer value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>The amount to increment.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/incrby">https://redis.io/commands/incrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;primes&#039;, 2);<br />
$redis-&gt;incrby(&#039;primes&#039;, 1);<br />
$redis-&gt;incrby(&#039;primes&#039;, 2);<br />
$redis-&gt;incrby(&#039;primes&#039;, 2);<br />
$redis-&gt;incrby(&#039;primes&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_incrByFloat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1447">at line 1447</a></div>
        <code>                    Redis|float|false
    <strong>incrByFloat</strong>(string $key, float $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a numeric key by a floating point value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td><p>How much to increment (or decrement) the value.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The new value of the key or false if the key didn't contain a string.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;incrbyfloat(&#039;tau&#039;, 3.1415926);<br />
$redis-&gt;incrbyfloat(&#039;tau&#039;, 3.1415926);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_info">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1463">at line 1463</a></div>
        <code>                    Redis|array|false
    <strong>info</strong>(string ...$sections)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve information about the connected redis-server.  If no arguments are passed to
this function, redis will return every info field.  Alternatively you may pass a specific
section you want returned (e.g. 'server', or 'memory') to receive only information pertaining
to that section.</p></p>                <p><p>If connected to Redis server &gt;= 7.0.0 you may pass multiple optional sections.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>...$sections</td>
                <td><p>Optional section(s) you wish Redis server to return.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/info/">https://redis.io/commands/info/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_isConnected">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1470">at line 1470</a></div>
        <code>                    bool
    <strong>isConnected</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check if we are currently connected to a Redis instance.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if we are, false if not</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_keys">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1473">at line 1473</a></div>
        <code>                    <a href="Redis.html">Redis</a>|array|false
    <strong>keys</strong>(string $pattern)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$pattern</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|array|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lInsert">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1479">at line 1479</a></div>
        <code>                    <a href="Redis.html">Redis</a>|int|false
    <strong>lInsert</strong>(string $key, string $pos, mixed $pivot, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$pos</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$pivot</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1488">at line 1488</a></div>
        <code>                    Redis|int|false
    <strong>lLen</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the length of a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements in the list or false on failure.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lMove">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1505">at line 1505</a></div>
        <code>                    Redis|string|false
    <strong>lMove</strong>(string $src, string $dst, string $wherefrom, string $whereto)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Move an element from one list into another.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source list.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$wherefrom</td>
                <td><p>Where in the source list to retrieve the element.  This can be either
<code>Redis::LEFT</code>, or <code>Redis::RIGHT</code>.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$whereto</td>
                <td><p>Where in the destination list to put the element.  This can be either
<code>Redis::LEFT</code>, or <code>Redis::RIGHT</code>.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The element removed from the source list.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPush(&#039;numbers&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;);<br />
$redis-&gt;lMove(&#039;numbers&#039;, &#039;odds&#039;, Redis::LEFT, Redis::LEFT);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1520">at line 1520</a></div>
        <code>                    Redis|bool|string|array
    <strong>lPop</strong>(string $key, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements off a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to pop from.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional number of elements to remove.  By default one element is popped.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool|string|array</td>
            <td><p>Will return the element(s) popped from the list or false/NULL
if none was removed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lpop">https://redis.io/commands/lpop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lpop(&#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;lpop(&#039;mylist&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lPos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1548">at line 1548</a></div>
        <code>                    Redis|null|bool|int|array
    <strong>lPos</strong>(string $key, mixed $value, array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the index of an element in a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to search for.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>Options to configure how the command operates</p>
<pre><code>$options = [
    # How many matches to return.  By default a single match is returned.
    # If count is set to zero, it means unlimited.
    'COUNT' =&gt; &lt;num-matches&gt;

    # Specify which match you want returned.  `RANK` 1 means "the first match"
    # 2 means the second, and so on.  If passed as a negative number the
    # RANK is computed right to left, so a `RANK` of -1 means "the last match".
    'RANK'  =&gt; &lt;rank&gt;

    # This argument allows you to limit how many elements Redis will search before
    # returning.  This is useful to prevent Redis searching very long lists while
    # blocking the client.
    'MAXLEN =&gt; &lt;max-len&gt;
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|null|bool|int|array</td>
            <td><p>Returns one or more of the matching indexes, or null/false if none were found.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lPush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1562">at line 1562</a></div>
        <code>                    Redis|int|false
    <strong>lPush</strong>(string $key, mixed ...$elements)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prepend one or more elements to a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to prepend.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$elements</td>
                <td><p>One or more elements to prepend.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list after prepending.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lpush">https://redis.io/commands/lpush</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lPush(&#039;mylist&#039;, &#039;cat&#039;, &#039;bear&#039;, &#039;aligator&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rPush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1576">at line 1576</a></div>
        <code>                    Redis|int|false
    <strong>rPush</strong>(string $key, mixed ...$elements)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append one or more elements to a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to append to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$elements</td>
                <td><p>one or more elements to append.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/rpush">https://redis.io/commands/rpush</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPush(&#039;mylist&#039;, &#039;xray&#039;, &#039;yankee&#039;, &#039;zebra&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lPushx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1587">at line 1587</a></div>
        <code>                    Redis|int|false
    <strong>lPushx</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prepend an element to a list but only if the list exists</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to prepend to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to prepend.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rPushx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1598">at line 1598</a></div>
        <code>                    Redis|int|false
    <strong>rPushx</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append an element to a list but only if the list exists</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to prepend to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to prepend.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lSet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1611">at line 1611</a></div>
        <code>                    Redis|bool
    <strong>lSet</strong>(string $key, int $index, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a list element at an index to a specific value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to modify.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>The position of the element to change.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The new value.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the list was modified.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lset">https://redis.io/commands/lset</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lastSave">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1620">at line 1620</a></div>
        <code>                    int
    <strong>lastSave</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the last time Redis' database was persisted to disk.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The unix timestamp of the last save time</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lastsave">https://redis.io/commands/lastsave</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lindex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1629">at line 1629</a></div>
        <code>                    mixed
    <strong>lindex</strong>(string $key, int $index)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the element of a list by its index.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>The index to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The index or NULL/false if the element was not found.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1645">at line 1645</a></div>
        <code>                    Redis|array|false
    <strong>lrange</strong>(string $key, int $start, int $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve elements from a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The beginning index to retrieve.  This number can be negative
meaning start from the end of the list.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The end index to retrieve.  This can also be negative to start
from the end of the list.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The range of elements between the indexes.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lrange(&#039;mylist&#039;, 0, -1);  // the whole list</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;lrange(&#039;mylist&#039;, -2, -1); // the last two elements in the list.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_lrem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1658">at line 1658</a></div>
        <code>                    Redis|int|false
    <strong>lrem</strong>(string $key, mixed $value, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more matching elements from a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to truncate.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to remove.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>How many elements matching the value to remove.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements removed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/lrem">https://redis.io/commands/lrem</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_ltrim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1671">at line 1671</a></div>
        <code>                    Redis|bool
    <strong>ltrim</strong>(string $key, int $start, int $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Trim a list to a subrange of elements.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to trim</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The starting index to keep</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The ending index to keep.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>true if the list was trimmed.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ltrim(&#039;mylist&#039;, 0, 3);  // Keep the first four elements</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_mget">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1681">at line 1681</a></div>
        <code>                    Redis|array
    <strong>mget</strong>(array $keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one ore more string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>The keys to retrieve</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array</td>
            <td><p>an array of keys with their values.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;mget([&#039;key1&#039;, &#039;key2&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_migrate">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1683">at line 1683</a></div>
        <code>                    Redis|bool
    <strong>migrate</strong>(string $host, int $port, string|array $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$dstdb</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$copy</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$replace</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$credentials</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_move">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1693">at line 1693</a></div>
        <code>                    Redis|bool
    <strong>move</strong>(string $key, int $index)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Move a key to a different database on the same redis instance.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to move</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was moved</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_mset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1705">at line 1705</a></div>
        <code>                    Redis|bool
    <strong>mset</strong>(array $key_values)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one ore more string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$key_values</td>
                <td><p>An array with keys and their values.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the keys could be set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/mset">https://redis.io/commands/mset</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;mSet([&#039;foo&#039; =&gt; &#039;bar&#039;, &#039;baz&#039; =&gt; &#039;bop&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_msetnx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1718">at line 1718</a></div>
        <code>                    Redis|bool
    <strong>msetnx</strong>(array $key_values)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one ore more string keys but only if none of the key exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$key_values</td>
                <td><p>An array of keys with their values.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the keys were set and false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/msetnx">https://redis.io/commands/msetnx</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;msetnx([&#039;foo&#039; =&gt; &#039;bar&#039;, &#039;baz&#039; =&gt; &#039;bop&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_multi">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1736">at line 1736</a></div>
        <code>                    bool|Redis
    <strong>multi</strong>(int $value = Redis::MULTI)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Begin a transaction.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>The type of transaction to start.  This can either be <code>Redis::MULTI</code> or
`Redis::PIPELINE'.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool|Redis</td>
            <td><p>True if the transaction could be started.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/multi">https://redis.io/commands/multi</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;multi();<br />
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);<br />
$redis-&gt;get(&#039;foo&#039;);<br />
$redis-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_object">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1738">at line 1738</a></div>
        <code>                    Redis|int|string|false
    <strong>object</strong>(string $subcommand, string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$subcommand</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|string|false</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_open">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1744">at line 1744</a></div>
        <code>                    bool
    <strong>open</strong>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pconnect">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1746">at line 1746</a></div>
        <code>                    bool
    <strong>pconnect</strong>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_persist">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1755">at line 1755</a></div>
        <code>                    Redis|bool
    <strong>persist</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove the expiration from a key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to operate against.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if a timeout was removed and false if it was not or the key didn't exist.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pexpire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1769">at line 1769</a></div>
        <code>                    bool
    <strong>pexpire</strong>(string $key, int $timeout, string|null $mode = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets an expiration in milliseconds on a given key.  If connected to Redis &gt;= 7.0.0
you can pass an optional mode argument that modifies how the command will execute.</p></p>                <p><p><a href="Redis.html">Redis::expire()</a> for a description of the mode argument.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.
@param string $mode  A two character modifier that changes how the
command works.</p>
<p>@return Redis|bool   True if an expiry was set on the key, and false otherwise.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pexpireAt">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1783">at line 1783</a></div>
        <code>                    Redis|bool
    <strong>pexpireAt</strong>(string $key, int $timestamp, string|null $mode = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key's expiration to a specific Unix Timestamp in milliseconds.  If connected to
Redis &gt;= 7.0.0 you can pass an optional 'mode' argument.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timestamp</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_expire">
Redis::expire</a>
                                    </td>
                <td>For a description of the mode argument.

@param string  $key  The key to set an expiration on.
@param string  $mode A two character modifier that changes how the
                     command works.

@return Redis|bool   True if an expiration was set on the key, false otherwise.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pfadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1796">at line 1796</a></div>
        <code>                    Redis|int
    <strong>pfadd</strong>(string $key, array $elements)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more elements to a Redis HyperLogLog key</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$elements</td>
                <td><p>One or more elements to add.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int</td>
            <td><p>Returns 1 if the set was altered, and zero if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/pfadd">https://redis.io/commands/pfadd</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pfcount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1807">at line 1807</a></div>
        <code>                    Redis|int
    <strong>pfcount</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the cardinality of a Redis HyperLogLog key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name we wish to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int</td>
            <td><p>The estimated cardinality of the set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/pfcount">https://redis.io/commands/pfcount</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pfmerge">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1819">at line 1819</a></div>
        <code>                    Redis|bool
    <strong>pfmerge</strong>(string $dst, array $srckeys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Merge one or more source HyperLogLog sets into a destination set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination key.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$srckeys</td>
                <td><p>One or more source keys.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Always returns true.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/pfmerge">https://redis.io/commands/pfmerge</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_ping">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1834">at line 1834</a></div>
        <code>                    Redis|string|bool
    <strong>ping</strong>(string $message = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>PING the redis server with an optional string argument.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$message</td>
                <td><p>An optional string message that Redis will reply with, if passed.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>If passed no message, this command will simply return <code>true</code>.
If a message is passed, it will return the message.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/ping">https://redis.io/commands/ping</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ping();</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;ping(&#039;beep boop&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pipeline">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1854">at line 1854</a></div>
        <code>                    bool|Redis
    <strong>pipeline</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Enter into pipeline mode.</p></p>                <p><p>Pipeline mode is the highest performance way to send many commands to Redis
as they are aggregated into one stream of commands and then all sent at once
when the user calls Redis::exec().</p>
<p>NOTE:  That this is shorthand for Redis::multi(Redis::PIPELINE)</p></p>        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool|Redis</td>
            <td><p>The redis object is returned, to facilitate method chaining.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()<br />
-&gt;set(&#039;foo&#039;, &#039;bar&#039;)<br />
-&gt;del(&#039;mylist&#039;)<br />
-&gt;rpush(&#039;mylist&#039;, &#039;a&#039;, &#039;b&#039;, &#039;c&#039;)<br />
-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_popen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1860">at line 1860</a></div>
        <code>                    bool
    <strong>popen</strong>(string $host, int $port = 6379, float $timeout = 0, string $persistent_id = NULL, int $retry_interval = 0, float $read_timeout = 0, array $context = NULL)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_psetex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1873">at line 1873</a></div>
        <code>                    Redis|bool
    <strong>psetex</strong>(string $key, int $expire, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key with an expiration time in milliseconds</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$expire</td>
                <td><p>The TTL to set, in milliseconds.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key could be set.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;psetex(&#039;mykey&#039;, 1000, &#039;myval&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_psubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1889">at line 1889</a></div>
        <code>                    bool
    <strong>psubscribe</strong>(array $patterns, callable $cb)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Subscribe to one or more glob-style patterns</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$patterns</td>
                <td><p>One or more patterns to subscribe to.</p></td>
            </tr>
                    <tr>
                <td>callable</td>
                <td>$cb</td>
                <td><p>A callback with the following prototype:</p>
<pre><code>function ($redis, $channel, $message) { }</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if we were subscribed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/psubscribe">https://redis.io/commands/psubscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pttl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1906">at line 1906</a></div>
        <code>                    Redis|int|false
    <strong>pttl</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a keys time to live in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The key's TTL or one of two special values if it has none.</p>
<pre><code>-1 - The key has no TTL.
-2 - The key did not exist.</code></pre></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/pttl">https://redis.io/commands/pttl</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pttl(&#039;ttl-key&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_publish">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1918">at line 1918</a></div>
        <code>                    Redis|int|false
    <strong>publish</strong>(string $channel, string $message)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Publish a message to a pubsub channel</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$channel</td>
                <td><p>The channel to publish to.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$message</td>
                <td><p>The message itself.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of subscribed clients to the given channel.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/publish">https://redis.io/commands/publish</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_pubsub">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1920">at line 1920</a></div>
        <code>                    mixed
    <strong>pubsub</strong>(string $command, mixed $arg = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$arg</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_punsubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1933">at line 1933</a></div>
        <code>                    Redis|array|bool
    <strong>punsubscribe</strong>(array $patterns)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unsubscribe from one or more channels by pattern</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$patterns</td>
                <td><p>One or more glob-style patterns of channel names.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The array of subscribed patterns or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/punsubscribe">https://redis.io/commands/punsubscribe</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/subscribe">https://redis.io/commands/subscribe</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_subscribe">
Redis::subscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1949">at line 1949</a></div>
        <code>                    Redis|array|string|bool
    <strong>rPop</strong>(string $key, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements from the end of a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>A redis LIST key name.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The maximum number of elements to pop at once.
NOTE:  The <code>count</code> argument requires Redis &gt;= 6.2.0</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|string|bool</td>
            <td><p>One ore more popped elements or false if all were empty.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/rpop">https://redis.io/commands/rpop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPop(&#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rPop(&#039;mylist&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_randomKey">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1959">at line 1959</a></div>
        <code>                    Redis|string|false
    <strong>randomKey</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return a random key from the current database</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>A random key name or false if no keys exist</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/randomkey">https://redis.io/commands/randomkey</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rawcommand">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1973">at line 1973</a></div>
        <code>                    mixed
    <strong>rawcommand</strong>(string $command, mixed ...$args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute any arbitrary Redis command by name.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td><p>The command to execute</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>One or more arguments to pass to the command.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Can return any number of things depending on command executed.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;del&#039;, &#039;mystring&#039;, &#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;set&#039;, &#039;mystring&#039;, &#039;myvalue&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;rpush&#039;, &#039;mylist&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rename">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L1985">at line 1985</a></div>
        <code>                    Redis|bool
    <strong>rename</strong>(string $old_name, string $new_name)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unconditionally rename a key from $old_name to $new_name</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$old_name</td>
                <td><p>The original name of the key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$new_name</td>
                <td><p>The new name for the key</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was renamed or false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/rename">https://redis.io/commands/rename</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_renameNx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2004">at line 2004</a></div>
        <code>                    Redis|bool
    <strong>renameNx</strong>(string $key_src, string $key_dst)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Renames $key_src to $key_dst but only if newkey does not exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key_src</td>
                <td><p>The source key name</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key_dst</td>
                <td><p>The destination key name.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was renamed, false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/renamenx">https://redis.io/commands/renamenx</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;src&#039;, &#039;src_key&#039;);<br />
$redis-&gt;set(&#039;existing-dst&#039;, &#039;i_exist&#039;);<br />
<br />
$redis-&gt;renamenx(&#039;src&#039;, &#039;dst&#039;);<br />
$redis-&gt;renamenx(&#039;dst&#039;, &#039;existing-dst&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_reset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2011">at line 2011</a></div>
        <code>                    Redis|bool
    <strong>reset</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Reset the state of the connection.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Should always return true unless there is an error.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_restore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2049">at line 2049</a></div>
        <code>                    Redis|bool
    <strong>restore</strong>(string $key, int $ttl, string $value, array|null $options = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Restore a key by the binary payload generated by the DUMP command.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The name of the key you wish to create.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$ttl</td>
                <td><p>What Redis should set the key's TTL (in milliseconds) to once it is created.
Zero means no TTL at all.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The serialized binary value of the string (generated by DUMP).</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array of additional options that modifies how the command operates.</p>
<pre><code>$options = [
    'ABSTTL'          # If this is present, the `$ttl` provided by the user should
                      # be an absolute timestamp, in milliseconds()

    'REPLACE'         # This flag instructs Redis to store the key even if a key with
                      # that name already exists.

    'IDLETIME' =&gt; int # Tells Redis to set the keys internal 'idletime' value to a
                      # specific number (see the Redis command OBJECT for more info).
    'FREQ'     =&gt; int # Tells Redis to set the keys internal 'FREQ' value to a specific
                      # number (this relates to Redis' LFU eviction algorithm).
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was stored, false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/restore">https://redis.io/commands/restore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/dump">https://redis.io/commands/dump</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_dump">
Redis::dump</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;captains&#039;, &#039;Janeway&#039;, &#039;Picard&#039;, &#039;Sisko&#039;, &#039;Kirk&#039;, &#039;Archer&#039;);<br />
$serialized = $redis-&gt;dump(&#039;captains&#039;);<br />
<br />
$redis-&gt;restore(&#039;captains-backup&#039;, 0, $serialized);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_role">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2057">at line 2057</a></div>
        <code>                    mixed
    <strong>role</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Query whether the connected instance is a primary or replica</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Will return an array with the role of the connected instance unless there is
an error.</p></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_rpoplpush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2079">at line 2079</a></div>
        <code>                    Redis|string|false
    <strong>rpoplpush</strong>(string $srckey, string $dstkey)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Atomically pop an element off the end of a Redis LIST and push it to the beginning of
another.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td><p>The source key to pop from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dstkey</td>
                <td><p>The destination key to push to.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The popped element or false if the source key was empty.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/rpoplpush">https://redis.io/commands/rpoplpush</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()<br />
      -&gt;del(&#039;list1&#039;, &#039;list2&#039;)<br />
      -&gt;rpush(&#039;list1&#039;, &#039;list1-1&#039;, &#039;list1-2&#039;)<br />
      -&gt;rpush(&#039;list2&#039;, &#039;list2-1&#039;, &#039;list2-2&#039;)<br />
      -&gt;exec();<br />
<br />
$redis-&gt;rpoplpush(&#039;list2&#039;, &#039;list1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sAdd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2098">at line 2098</a></div>
        <code>                    Redis|int|false
    <strong>sAdd</strong>(string $key, mixed $value, mixed ...$other_values)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more values to a Redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_values</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values added to the set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sadd">https://redis.io/commands/sadd</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);<br />
<br />
$redis-&gt;sadd(&#039;myset&#039;, &#039;foo&#039;, &#039;bar&#039;, &#039;baz&#039;);<br />
$redis-&gt;sadd(&#039;myset&#039;, &#039;foo&#039;, &#039;new&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sAddArray">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2117">at line 2117</a></div>
        <code>                    int
    <strong>sAddArray</strong>(string $key, array $values)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one ore more values to a Redis SET key.  This is an alternative to Redis::sadd() but
instead of being variadic, takes a single array of values.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to add values to.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$values</td>
                <td><p>One or more members to add to the set.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The number of members added to the set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sadd">https://redis.io/commands/sadd</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sadd()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);<br />
<br />
$redis-&gt;sAddArray(&#039;myset&#039;, [&#039;foo&#039;, &#039;bar&#039;, &#039;baz&#039;]);<br />
$redis-&gt;sAddArray(&#039;myset&#039;, [&#039;foo&#039;, &#039;new&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sDiff">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2141">at line 2141</a></div>
        <code>                    Redis|array|false
    <strong>sDiff</strong>(string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more Redis SETS, this command returns all of the members from the first
set that are not in any subsequent set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first set</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional sets</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>Returns the elements from keys 2..N that don't exist in the
first sorted set, or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sdiff">https://redis.io/commands/sdiff</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()<br />
      -&gt;del(&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;)<br />
      -&gt;sadd(&#039;set1&#039;, &#039;apple&#039;, &#039;banana&#039;, &#039;carrot&#039;, &#039;date&#039;)<br />
      -&gt;sadd(&#039;set2&#039;, &#039;carrot&#039;)<br />
      -&gt;sadd(&#039;set3&#039;, &#039;apple&#039;, &#039;carrot&#039;, &#039;eggplant&#039;)<br />
      -&gt;exec();<br />
<br />
$redis-&gt;sdiff(&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sDiffStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2156">at line 2156</a></div>
        <code>                    Redis|int|false
    <strong>sDiffStore</strong>(string $dst, string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This method performs the same operation as SDIFF except it stores the resulting diff
values in a specified destination key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The key where to store the result</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first key to perform the DIFF on</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional keys.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values stored in the destination set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sdiffstore">https://redis.io/commands/sdiffstore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sdiff()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sInter">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2178">at line 2178</a></div>
        <code>                    Redis|array|false
    <strong>sInter</strong>(array|string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more Redis SET keys, this command will return all of the elements that are
in every one.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>The first SET key to intersect.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more Redis SET keys.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sinter">https://redis.io/commands/sinter</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()<br />
      -&gt;del(&#039;alice_likes&#039;, &#039;bob_likes&#039;, &#039;bill_likes&#039;)<br />
      -&gt;sadd(&#039;alice_likes&#039;, &#039;asparagus&#039;, &#039;broccoli&#039;, &#039;carrot&#039;, &#039;potato&#039;)<br />
      -&gt;sadd(&#039;bob_likes&#039;, &#039;asparagus&#039;, &#039;carrot&#039;, &#039;potato&#039;)<br />
      -&gt;sadd(&#039;bill_likes&#039;, &#039;broccoli&#039;, &#039;potato&#039;)<br />
      -&gt;exec();<br />
<br />
var_dump($redis-&gt;sinter(&#039;alice_likes&#039;, &#039;bob_likes&#039;, &#039;bill_likes&#039;));<br />
&lt;/code&gt;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sintercard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2200">at line 2200</a></div>
        <code>                    Redis|int|false
    <strong>sintercard</strong>(array $keys, int $limit = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one or more sets and return the cardinality of the result.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more set key names.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>A maximum cardinality to return.  This is useful to put an upper bound
on the amount of work Redis will do.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td>The</td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sintercard">https://redis.io/commands/sintercard</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;set1&#039;, &#039;apple&#039;, &#039;pear&#039;, &#039;banana&#039;, &#039;carrot&#039;);<br />
$redis-&gt;sAdd(&#039;set2&#039;, &#039;apple&#039;,         &#039;banana&#039;);<br />
$redis-&gt;sAdd(&#039;set3&#039;,          &#039;pear&#039;, &#039;banana&#039;);<br />
<br />
$redis-&gt;sInterCard([&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;]);<br />
?&gt;<br />
&lt;/code&gt;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sInterStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2222">at line 2222</a></div>
        <code>                    Redis|int|false
    <strong>sInterStore</strong>(array|string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform the intersection of one or more Redis SETs, storing the result in a destination
key, rather than returning them.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument was a string, subsequent arguments should
be source key names.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values stored in the destination key or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sinterstore">https://redis.io/commands/sinterstore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sinter()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sInterStore([&#039;dst&#039;, &#039;src1&#039;, &#039;src2&#039;, &#039;src3&#039;]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;sInterStore(&#039;dst&#039;, &#039;src1&#039;, &#039;src&#039;2&#039;, &#039;src3&#039;);<br />
?&gt;<br />
&lt;/code&gt;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sMembers">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2237">at line 2237</a></div>
        <code>                    Redis|array|false
    <strong>sMembers</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve every member from a set key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set name.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>Every element in the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/smembers">https://redis.io/commands/smembers</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;tng-crew&#039;, ...[&#039;Picard&#039;, &#039;Riker&#039;, &#039;Data&#039;, &#039;Worf&#039;, &#039;La Forge&#039;, &#039;Troi&#039;, &#039;Crusher&#039;, &#039;Broccoli&#039;]);<br />
$redis-&gt;sMembers(&#039;tng-crew&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sMisMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2257">at line 2257</a></div>
        <code>                    Redis|array|false
    <strong>sMisMember</strong>(string $key, string $member, string ...$other_members)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check if one or more values are members of a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first value to test if exists in the set.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>Any number of additional values to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of integers representing whether each passed value
was a member of the set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/smismember">https://redis.io/commands/smismember</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/smember">https://redis.io/commands/smember</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::smember()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;ds9-crew&#039;, ...[&quot;Sisko&quot;, &quot;Kira&quot;, &quot;Dax&quot;, &quot;Worf&quot;, &quot;Bashir&quot;, &quot;O&#039;Brien&quot;]);<br />
$members = $redis-&gt;sMIsMember(&#039;ds9-crew&#039;, ...[&#039;Sisko&#039;, &#039;Picard&#039;, &#039;Data&#039;, &#039;Worf&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sMove">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2277">at line 2277</a></div>
        <code>                    Redis|bool
    <strong>sMove</strong>(string $src, string $dst, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop a member from one set and push it onto another.  This command will create the
destination set if it does not currently exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source set.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The member you wish to move.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the member was moved, and false if it wasn't in the set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/smove">https://redis.io/commands/smove</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;numbers&#039;, &#039;zero&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;, &#039;four&#039;);<br />
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;zero&#039;);<br />
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;two&#039;);<br />
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;four&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2293">at line 2293</a></div>
        <code>                    Redis|string|array|false
    <strong>sPop</strong>(string $key, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more elements from a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set in question.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional number of members to pop.   This defaults to
removing one element.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/spop">https://redis.io/commands/spop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;numbers&#039;, &#039;evens&#039;);<br />
$redis-&gt;sAdd(&#039;numbers&#039;, &#039;zero&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;, &#039;four&#039;);<br />
$redis-&gt;sPop(&#039;numbers&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sRandMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2316">at line 2316</a></div>
        <code>                    Redis|string|array|false
    <strong>sRandMember</strong>(string $key, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more random members of a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count of members to return.</p>
<p>If this value is positive, Redis will return <em>up to</em> the requested
number but with unique elements that will never repeat.  This means
you may receive fewer then <code>$count</code> replies.</p>
<p>If the number is negative, Redis will return the exact number requested
but the result may contain duplicate elements.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|false</td>
            <td><p>One or more random members or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/srandmember">https://redis.io/commands/srandmember</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;, 10);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;, -10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sUnion">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2330">at line 2330</a></div>
        <code>                    Redis|array|false
    <strong>sUnion</strong>(string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Returns the union of one or more Redis SET keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first SET to do a union with</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more subsequent keys</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The union of the one or more input sets or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sunion">https://redis.io/commands/sunion</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sunion(&#039;set1&#039;, &#039;set2&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sUnionStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2345">at line 2345</a></div>
        <code>                    Redis|int|false
    <strong>sUnionStore</strong>(string $dst, string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform a union of one or more Redis SET keys and store the result in a new set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first source key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional source keys</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in the destination SET or
false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sunionstore">https://redis.io/commands/sunionstore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sunion()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_save">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2356">at line 2356</a></div>
        <code>                    Redis|bool
    <strong>save</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Persist the Redis database to disk.  This command will block the server until the save is
completed.  For a nonblocking alternative, see Redis::bgsave().</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Returns true unless an error occurs.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/save">https://redis.io/commands/save</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::bgsave()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_scan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2419">at line 2419</a></div>
        <code>                    array|false
    <strong>scan</strong>(int|null $iterator, string|null $pattern = null, int $count = 0, string $type = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Incrementally scan the Redis keyspace, with optional pattern and type matching.</p></p>                <p><p>A note about Redis::SCAN_NORETRY and Redis::SCAN_RETRY.</p>
<p>For convenience, PhpRedis can retry SCAN commands itself when Redis returns an empty array of
keys with a nonzero iterator.  This can happen when matching against a pattern that very few
keys match inside a key space with a great many keys.  The following example demonstrates how
to use Redis::scan() with the option disabled and enabled.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int|null</td>
                <td>$iterator</td>
                <td><p>The cursor returned by Redis for every subsequent call to SCAN.  On
the initial invocation of the call, it should be initialized by the
caller to NULL.  Each time SCAN is invoked, the iterator will be
updated to a new number, until finally Redis will set the value to
zero, indicating that the scan is complete.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern for matching key names.  If passed as
NULL, it is the equivalent of sending '*' (match every key).</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint to redis that tells it how many keys to return in a single
call to SCAN.  The larger the number, the longer Redis may block
clients while iterating the key space.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$type</td>
                <td><p>An optional argument to specify which key types to scan (e.g.
'STRING', 'LIST', 'SET')</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array|false</td>
            <td><p>An array of keys, or false if no keys were returned for this
invocation of scan.  Note that it is possible for Redis to return
zero keys before having scanned the entire key space, so the caller
should instead continue to SCAN until the iterator reference is
returned to zero.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/scan">https://redis.io/commands/scan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
<br />
$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);<br />
<br />
$it = NULL;<br />
<br />
do {<br />
    $keys = $redis-&gt;scan($it, &#039;*zorg*&#039;);<br />
    foreach ($keys as $key) {<br />
        echo &quot;KEY: $key\n&quot;;<br />
    }<br />
} while ($it != 0);<br />
<br />
$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);<br />
<br />
$it = NULL;<br />
<br />
// When Redis::SCAN_RETRY is enabled, we can use simpler logic, as we will never receive an<br />
// empty array of keys when the iterator is nonzero.<br />
while ($keys = $redis-&gt;scan($it, &#039;*zorg*&#039;)) {<br />
    foreach ($keys as $key) {<br />
        echo &quot;KEY: $key\n&quot;;<br />
    }<br />
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_scard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2433">at line 2433</a></div>
        <code>                    Redis|int|false
    <strong>scard</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the number of members in a Redis set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to get the cardinality of.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The cardinality of the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/scard">https://redis.io/commands/scard</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;scard(&#039;set&#039;);<br />
&lt;/code&gt;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_script">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2448">at line 2448</a></div>
        <code>                    mixed
    <strong>script</strong>(string $command, mixed ...$args)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>An administrative command used to interact with LUA scripts stored on the server.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td><p>The script suboperation to execute.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>One ore more additional argument</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command returns various things depending on the specific operation executed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/script">https://redis.io/commands/script</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;script(&#039;load&#039;, &#039;return 1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;script(&#039;exists&#039;, sha1(&#039;return 1&#039;));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_select">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2461">at line 2461</a></div>
        <code>                    Redis|bool
    <strong>select</strong>(int $db)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Select a specific Redis database.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$db</td>
                <td><p>The database to select.  Note that by default Redis has 16 databases (0-15).</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>true on success and false on failure</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/select">https://redis.io/commands/select</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;select(1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_set">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2492">at line 2492</a></div>
        <code>                    Redis|string|bool
    <strong>set</strong>(string $key, mixed $value, mixed $options = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create or set a Redis STRING key to a value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$options</td>
                <td><p>Either an array with options for how to perform the set or an
integer with an expiration.  If an expiration is set PhpRedis
will actually send the <code>SETEX</code> command.</p>
<p>OPTION                         DESCRIPTION</p>
<hr />
<p>['EX' =&gt; 60]                   expire 60 seconds.
['PX' =&gt; 6000]                 expire in 6000 milliseconds.
['EXAT' =&gt; time() + 10]        expire in 10 seconds.
['PXAT' =&gt; time()*1000 + 1000] expire in 1 second.
['KEEPTTL' =&gt; true]            Redis will not update the key's current TTL.
['XX']                         Only set the key if it already exists.
['NX']                         Only set the key if it doesn't exist.
['GET']                        Instead of returning <code>+OK</code> return the previous value of the
key or NULL if the key didn't exist.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>True if the key was set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/set">https://redis.io/commands/set</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/setex">https://redis.io/commands/setex</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;key&#039;, &#039;value&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;key&#039;, &#039;expires_in_60_seconds&#039;, 60);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setBit">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2508">at line 2508</a></div>
        <code>                    Redis|int|false
    <strong>setBit</strong>(string $key, int $idx, bool $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a specific bit in a Redis string to zero or one</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis STRING key to modify</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$idx</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$value</td>
                <td><p>Whether to set the bit to zero or one.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The original value of the bit or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/setbit">https://redis.io/commands/setbit</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);<br />
$redis-&gt;setbit(&#039;foo&#039;, 7, 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2525">at line 2525</a></div>
        <code>                    Redis|int|false
    <strong>setRange</strong>(string $key, int $index, string $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Update or append to a Redis string at a specific starting index</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to update</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>Where to insert the provided value</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to copy into the string.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the string or false on failure</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/setrange">https://redis.io/commands/setrange</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;message&#039;, &#039;Hello World&#039;);<br />
$redis-&gt;setRange(&#039;message&#039;, 6, &#039;Redis&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setOption">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2557">at line 2557</a></div>
        <code>                    bool
    <strong>setOption</strong>(int $option, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a configurable option on the Redis object.</p></p>                <p><p>Following are a list of options you can set:</p>
<table>
<thead>
<tr>
<th>OPTION</th>
<th>TYPE</th>
<th>DESCRIPTION</th>
</tr>
</thead>
<tbody>
<tr>
<td>OPT_MAX_RETRIES</td>
<td>int</td>
<td>The maximum number of times Redis will attempt to reconnect if it gets disconnected, before throwing an exception.</td>
</tr>
<tr>
<td>OPT_SCAN</td>
<td>enum</td>
<td>Redis::OPT_SCAN_RETRY, or Redis::OPT_SCAN_NORETRY.  Whether PhpRedis should automatically SCAN again when zero keys but a nonzero iterator are returned.</td>
</tr>
<tr>
<td>OPT_SERIALIZER</td>
<td>enum</td>
<td>Set the automatic data serializer.<br><code>Redis::SERIALIZER_NONE</code><br><code>Redis::SERIALIZER_PHP</code><br><code>Redis::SERIALIZER_IGBINARY</code><br><code>Redis::SERIALIZER_MSGPACK</code>, <code>Redis::SERIALIZER_JSON</code></td>
</tr>
<tr>
<td>OPT_PREFIX</td>
<td>string</td>
<td>A string PhpRedis will use to prefix every key we read or write.</td>
</tr>
<tr>
<td>OPT_READ_TIMEOUT</td>
<td>float</td>
<td>How long PhpRedis will block for a response from Redis before throwing a 'read error on connection' exception.</td>
</tr>
<tr>
<td>OPT_TCP_KEEPALIVE</td>
<td>bool</td>
<td>Set or disable TCP_KEEPALIVE on the connection.</td>
</tr>
<tr>
<td>OPT_COMPRESSION</td>
<td>enum</td>
<td>Set the compression algorithm<br><code>Redis::COMPRESSION_NONE</code><br><code>Redis::COMPRESSION_LZF</code><br><code>Redis::COMPRESSION_LZ4</code><br> <code>Redis::COMPRESSION_ZSTD</code></td>
</tr>
<tr>
<td>OPT_REPLY_LITERAL</td>
<td>bool</td>
<td>If set to true, PhpRedis will return the literal string Redis returns for LINE replies (e.g. '+OK'), rather than <code>true</code>.</td>
</tr>
<tr>
<td>OPT_COMPRESSION_LEVEL</td>
<td>int</td>
<td>Set a specific compression level if Redis is compressing data.</td>
</tr>
<tr>
<td>OPT_NULL_MULTIBULK_AS_NULL</td>
<td>bool</td>
<td>Causes PhpRedis to return <code>NULL</code> rather than <code>false</code> for NULL MULTIBULK replies</td>
</tr>
<tr>
<td>OPT_BACKOFF_ALGORITHM</td>
<td>enum</td>
<td>The exponential backoff strategy to use.</td>
</tr>
<tr>
<td>OPT_BACKOFF_BASE</td>
<td>int</td>
<td>The minimum delay between retries when backing off.</td>
</tr>
<tr>
<td>OPT_BACKOFF_CAP</td>
<td>int</td>
<td>The maximum delay between replies when backing off.</td>
</tr>
</tbody>
</table></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$option</td>
                <td><p>The option constant.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The option value.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>true if the setting was updated, false if not.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_getOption">
Redis::getOption</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method___construct">
Redis::__construct</a>
                                    </td>
                <td>for details about backoff strategies.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2570">at line 2570</a></div>
        <code>                    <a href="Redis.html">Redis</a>|bool
    <strong>setex</strong>(string $key, int $expire, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a Redis STRING key with a specific expiration in seconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The name of the key to set.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$expire</td>
                <td><p>The key's expiration in seconds.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|bool</td>
            <td><p>True on success or false on failure.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setex(&#039;60s-ttl&#039;, 60, &#039;some-value&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_setnx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2585">at line 2585</a></div>
        <code>                    Redis|bool
    <strong>setnx</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key to a value, but only if that key does not already exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>What to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Returns true if the key was set and false otherwise.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/setnx">https://redis.io/commands/setnx</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setnx(&#039;existing-key&#039;, &#039;existing-value&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;setnx(&#039;new-key&#039;, &#039;new-value&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sismember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2597">at line 2597</a></div>
        <code>                    Redis|bool
    <strong>sismember</strong>(string $key, mixed $value)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check whether a given value is the member of a Redis SET.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The redis set to check.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to test.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the member exists and false if not.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sismember(&#039;myset&#039;, &#039;mem1&#039;, &#039;mem2&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_slaveof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2613">at line 2613</a></div>
        <code>                    Redis|bool
    <strong>slaveof</strong>(string $host = NULL, int $port = 6379)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p><p>Turn a redis instance into a replica of another or promote a replica
to a primary.</p></p>                <p><p>This method and the corresponding command in Redis has been marked deprecated
and users should instead use Redis::replicaof() if connecting to redis-server</p>
<blockquote>
<p>= 5.0.0.</p>
</blockquote></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/slaveof">https://redis.io/commands/slaveof</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/replicaof">https://redis.io/commands/replicaof</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_replicaof">
Redis::replicaof</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_replicaof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2639">at line 2639</a></div>
        <code>                    Redis|bool
    <strong>replicaof</strong>(string $host = NULL, int $port = 6379)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Used to turn a Redis instance into a replica of another, or to remove
replica status promoting the instance to a primary.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td><p>The host of the primary to start replicating.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td><p>The port of the primary to start replicating.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Success if we were successfully able to start replicating a primary or
were able to promote the replicat to a primary.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/replicaof">https://redis.io/commands/replicaof</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/slaveof">https://redis.io/commands/slaveof</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_slaveof">
Redis::slaveof</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
<br />
// Attempt to become a replica of a Redis instance at 127.0.0.1:9999<br />
$redis-&gt;replicaof(&#039;127.0.0.1&#039;, 9999);<br />
<br />
// When passed no arguments, PhpRedis will deliver the command `REPLICAOF NO ONE`<br />
// attempting to promote the instance to a primary.<br />
$redis-&gt;replicaof();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_touch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2653">at line 2653</a></div>
        <code>                    Redis|int|false
    <strong>touch</strong>(array|string $key_or_array, string ...$more_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Update one or more keys last modified metadata.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key_or_array</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$more_keys</td>
                <td><p>One or more keys to send to the command.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>This command returns the number of keys that exist and
had their last modified time reset</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/touch/">https://redis.io/commands/touch/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_slowlog">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2681">at line 2681</a></div>
        <code>                    mixed
    <strong>slowlog</strong>(string $operation, int $length = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Interact with Redis' slowlog functionality in various ways, depending
on the value of 'operation'.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The operation you wish to perform.  This can
be one of the following values:
'GET'   - Retrieve the Redis slowlog as an array.
'LEN'   - Retrieve the length of the slowlog.
'RESET' - Remove all slowlog entries.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$length</td>
                <td><p>This optional argument can be passed when operation
is 'get' and will specify how many elements to retrieve.
If omitted Redis will send up to a default number of
entries, which is configurable.</p>
<p>Note:  With Redis &gt;= 7.0.0 you can send -1 to mean &quot;all&quot;.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/slowlog/">https://redis.io/commands/slowlog/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;get&#039;, -1);   // Retrieve all slowlog entries.</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;len&#039;);       // Retrieve slowlog length.</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;reset&#039;);     // Reset the slowlog.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sort">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2710">at line 2710</a></div>
        <code>                    mixed
    <strong>sort</strong>(string $key, array|null $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sort the contents of a Redis key in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key you wish to sort</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>Various options controlling how you would like the
data sorted.  See blow for a detailed description
of this options array.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can either return an array with the sorted data
or the number of elements placed in a destination set when
using the STORE option.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sort/">https://redis.io/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$options = [<br />
    &#039;SORT&#039;  =&gt; &#039;ASC&#039;|| &#039;DESC&#039; // Sort in descending or descending order.<br />
    &#039;ALPHA&#039; =&gt; true || false  // Whether to sort alphanumerically.<br />
    &#039;LIMIT&#039; =&gt; [0, 10]        // Return a subset of the data at offset, count<br />
    &#039;BY&#039;    =&gt; &#039;weight_*&#039;     // For each element in the key, read data from the<br />
                                 external key weight_* and sort based on that value.<br />
    &#039;GET&#039;   =&gt; &#039;weight_*&#039;     // For each element in the source key, retrieve the<br />
                                 data from key weight_* and return that in the result<br />
                                 rather than the source keys&#039; element.  This can<br />
                                 be used in combination with &#039;BY&#039;<br />
];</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sort_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2717">at line 2717</a></div>
        <code>                    mixed
    <strong>sort_ro</strong>(string $key, array|null $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply a read-only variant of the sort command</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_sort">
Redis::sort</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sortAsc">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2722">at line 2722</a></div>
        <code>                    array
    <strong>sortAsc</strong>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sortAscAlpha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2727">at line 2727</a></div>
        <code>                    array
    <strong>sortAscAlpha</strong>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sortDesc">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2732">at line 2732</a></div>
        <code>                    array
    <strong>sortDesc</strong>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sortDescAlpha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2737">at line 2737</a></div>
        <code>                    array
    <strong>sortDescAlpha</strong>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small></code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_srem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2752">at line 2752</a></div>
        <code>                    Redis|int|false
    <strong>srem</strong>(string $key, mixed $value, mixed ...$other_values)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more values from a Redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis SET key in question.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The first value to remove.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_values</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values removed from the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/srem">https://redis.io/commands/srem</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sRem(&#039;set1&#039;, &#039;mem1&#039;, &#039;mem2&#039;, &#039;not-in-set&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_sscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2809">at line 2809</a></div>
        <code>                    array|false
    <strong>sscan</strong>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Scan the members of a redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis SET key in question.</p></td>
            </tr>
                    <tr>
                <td>int|null</td>
                <td>$iterator</td>
                <td><p>A reference to an iterator which should be initialized to NULL that
PhpRedis will update with the value returned from Redis after each
subsequent call to SSCAN.  Once this cursor is zero you know all
members have been traversed.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob style pattern to match against, so Redis only
returns the subset of members matching this pattern.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint to Redis as to how many members it should scan in one command
before returning members for that iteration.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>array|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/sscan">https://redis.io/commands/sscan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/scan">https://redis.io/commands/scan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);<br />
for ($i = 0; $i &lt; 10000; $i++) {<br />
    $redis-&gt;sAdd(&#039;myset&#039;, &quot;member:$i&quot;);<br />
}<br />
$redis-&gt;sadd(&#039;myset&#039;, &#039;foofoo&#039;);<br />
<br />
$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);<br />
<br />
$scanned = 0;<br />
$it = NULL;<br />
<br />
// Without Redis::SCAN_RETRY we may receive empty results and<br />
// a nonzero iterator.<br />
do {<br />
    // Scan members containing &#039;5&#039;<br />
    $members = $redis-&gt;sscan(&#039;myset&#039;, $it, &#039;*5*&#039;);<br />
    foreach ($members as $member) {<br />
         echo &quot;NORETRY: $member\n&quot;;<br />
         $scanned++;<br />
    }<br />
} while ($it != 0);<br />
echo &quot;TOTAL: $scanned\n&quot;;<br />
<br />
$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);<br />
<br />
$scanned = 0;<br />
$it = NULL;<br />
<br />
// With Redis::SCAN_RETRY PhpRedis will never return an empty array<br />
// when the cursor is non-zero<br />
while (($members = $redis-&gt;sscan(&#039;myset&#039;, $it, &#039;*5*&#039;))) {<br />
    foreach ($members as $member) {<br />
        echo &quot;RETRY: $member\n&quot;;<br />
        $scanned++;<br />
    }<br />
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_strlen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2823">at line 2823</a></div>
        <code>                    Redis|int|false
    <strong>strlen</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the length of a Redis STRING key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key we want the length of.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The length of the string key if it exists, zero if it does not, and
false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/strlen">https://redis.io/commands/strlen</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;strlen(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_subscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2854">at line 2854</a></div>
        <code>                    bool
    <strong>subscribe</strong>(array $channels, callable $cb)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Subscribe to one or more Redis pubsub channels.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channel names.</p></td>
            </tr>
                    <tr>
                <td>callable</td>
                <td>$cb</td>
                <td><p>The callback PhpRedis will invoke when we receive a message
from one of the subscribed channels.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True on success, false on faiilure.  Note that this command will block the
client in a subscribe loop, waiting for messages to arrive.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/subscribe">https://redis.io/commands/subscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
<br />
$redis-&gt;subscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {<br />
    echo &quot;[$channel]: $message\n&quot;;<br />
<br />
    // Unsubscribe from the message channel when we read &#039;quit&#039;<br />
    if ($message == &#039;quit&#039;) {<br />
        echo &quot;Unsubscribing from &#039;$channel&#039;\n&quot;;<br />
        $redis-&gt;unsubscribe([$channel]);<br />
    }<br />
});<br />
<br />
// Once we read &#039;quit&#039; from both channel-1 and channel-2 the subscribe loop will be<br />
// broken and this command will execute.<br />
echo &quot;Subscribe loop ended\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_swapdb">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2877">at line 2877</a></div>
        <code>                    Redis|bool
    <strong>swapdb</strong>(int $src, int $dst)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Atomically swap two Redis databases so that all of the keys in the source database will
now be in the destination database and vice-versa.</p></p>                <p><p>Note: This command simply swaps Redis' internal pointer to the database and is therefore
very fast, regardless of the size of the underlying databases.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$src</td>
                <td><p>The source database number</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$dst</td>
                <td><p>The destination database number</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Success if the databases could be swapped and false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/swapdb">https://redis.io/commands/swapdb</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_del">
Redis::del</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;select(0);<br />
$redis-&gt;set(&#039;db0-key&#039;, &#039;db0-value&#039;);<br />
$redis-&gt;swapdb(0, 1);<br />
$redis-&gt;get(&#039;db0-key&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_time">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2889">at line 2889</a></div>
        <code>                    Redis|array
    <strong>time</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the server time from the connected Redis instance.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array</td>
            <td><p>two element array consisting of a Unix Timestamp and the number of microseconds
elapsed since the second.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/time">https://redis.io/commands/time</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;time();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_ttl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2903">at line 2903</a></div>
        <code>                    Redis|int|false
    <strong>ttl</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the amount of time a Redis key has before it will expire, in seconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Key we want the TTL for.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>(a) The number of seconds until the key expires, or -1 if the key has
no expiration, and -2 if the key does not exist.  In the event of an
error, this command will return false.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/ttl">https://redis.io/commands/ttl</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ttl(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_type">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2928">at line 2928</a></div>
        <code>                    Redis|int|false
    <strong>type</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the type of a given Redis key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The Redis type constant or false on failure.</p>
<p>The Redis class defines several type constants that correspond with Redis key types.</p>
<pre><code>Redis::REDIS_NOT_FOUND
Redis::REDIS_STRING
Redis::REDIS_SET
Redis::REDIS_LIST
Redis::REDIS_ZSET
Redis::REDIS_HASH
Redis::REDIS_STREAM</code></pre></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/type">https://redis.io/commands/type</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">foreach ($redis-&gt;keys(&#039;*&#039;) as $key) {<br />
    echo &quot;$key =&gt; &quot; . $redis-&gt;type($key) . &quot;\n&quot;;<br />
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_unlink">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2949">at line 2949</a></div>
        <code>                    Redis|int|false
    <strong>unlink</strong>(array|string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete one or more keys from the Redis database.  Unlike this operation, the actual
deletion is asynchronous, meaning it is safe to delete large keys without fear of
Redis blocking for a long period of time.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument passed to this method was a string
you may pass any number of additional key names.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys deleted or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/unlink">https://redis.io/commands/unlink</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/del">https://redis.io/commands/del</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_del">
Redis::del</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;unlink(&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;unlink([&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_unsubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2972">at line 2972</a></div>
        <code>                    Redis|array|bool
    <strong>unsubscribe</strong>(array $channels)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unsubscribe from one or more subscribed channels.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channels to unsubscribe from.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The array of unsubscribed channels.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/unsubscribe">https://redis.io/commands/unsubscribe</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_subscribe">
Redis::subscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;subscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {<br />
    if ($message == &#039;quit&#039;) {<br />
        echo &quot;$channel =&gt; &#039;quit&#039; detected, unsubscribing!\n&quot;;<br />
        $redis-&gt;unsubscribe([$channel]);<br />
    } else {<br />
        echo &quot;$channel =&gt; $message\n&quot;;<br />
    }<br />
});<br />
<br />
echo &quot;We&#039;ve unsubscribed from both channels, exiting\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_unwatch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L2983">at line 2983</a></div>
        <code>                    Redis|bool
    <strong>unwatch</strong>()
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove any previously WATCH'ed keys in a transaction.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>on success and false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/unwatch">https://redis.io/commands/unwatch</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/unwatch">https://redis.io/commands/unwatch</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_watch">
Redis::watch</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_watch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3023">at line 3023</a></div>
        <code>                    Redis|bool
    <strong>watch</strong>(array|string $key, string ...$other_keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Watch one or more keys for conditional execution of a transaction.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument was passed as a string, any number of additional
string key names may be passed variadically.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/watch">https://redis.io/commands/watch</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/unwatch">https://redis.io/commands/unwatch</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis1 = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
$redis2 = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
<br />
// Start watching &#039;incr-key&#039;<br />
$redis1-&gt;watch(&#039;incr-key&#039;);<br />
<br />
// Retrieve its value.<br />
$val = $redis1-&gt;get(&#039;incr-key&#039;);<br />
<br />
// A second client modifies &#039;incr-key&#039; after we read it.<br />
$redis2-&gt;set(&#039;incr-key&#039;, 0);<br />
<br />
// Because another client changed the value of &#039;incr-key&#039; after we read it, this<br />
// is no longer a proper increment operation, but because we are `WATCH`ing the<br />
// key, this transaction will fail and we can try again.<br />
//<br />
// If were to comment out the above `$redis2-&gt;set(&#039;incr-key&#039;, 0)` line the<br />
// transaction would succeed.<br />
$redis1-&gt;multi();<br />
$redis1-&gt;set(&#039;incr-key&#039;, $val + 1);<br />
$res = $redis1-&gt;exec();<br />
<br />
// bool(false)<br />
var_dump($res);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_wait">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3037">at line 3037</a></div>
        <code>                    int|false
    <strong>wait</strong>(int $numreplicas, int $timeout)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Block the client up to the provided timeout until a certain number of replicas have confirmed
receiving them.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$numreplicas</td>
                <td><p>The number of replicas we want to confirm write operations</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td><p>How long to wait (zero meaning forever).</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int|false</td>
            <td><p>The number of replicas that have confirmed or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/wait">https://redis.io/commands/wait</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3078">at line 3078</a></div>
        <code>                    int|false
    <strong>xack</strong>(string $key, string $group, array $ids)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Acknowledge one ore more messages that are pending (have been consumed using XREADGROUP but
not yet acknowledged by XACK.)</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to use.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td><p>An array of stream entry IDs.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>int|false</td>
            <td><p>The number of acknowledged messages</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xack">https://redis.io/commands/xack</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xreadgroup">https://redis.io/commands/xreadgroup</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_xack">
Redis::xack</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ships&#039;, &#039;*&#039;, [&#039;name&#039; =&gt; &#039;Enterprise&#039;]);<br />
$redis-&gt;xAdd(&#039;ships&#039;, &#039;*&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);<br />
<br />
$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;Federation&#039;, &#039;0-0&#039;);<br />
<br />
// Consume a single message with the consumer group &#039;Federation&#039;<br />
$ship = $redis-&gt;xReadGroup(&#039;Federation&#039;, &#039;Picard&#039;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);<br />
<br />
/* Retrieve the ID of the message we read.<br />
assert(isset($ship[&#039;ships&#039;]));<br />
$id = key($ship[&#039;ships&#039;]);<br />
<br />
// The message we just read is now pending.<br />
$res = $redis-&gt;xPending(&#039;ships&#039;, &#039;Federation&#039;));<br />
var_dump($res);<br />
<br />
// We can tell Redis we were able to process the message by using XACK<br />
$res = $redis-&gt;xAck(&#039;ships&#039;, &#039;Federation&#039;, [$id]);<br />
assert($res === 1);<br />
<br />
// The message should no longer be pending.<br />
$res = $redis-&gt;xPending(&#039;ships&#039;, &#039;Federation&#039;);<br />
var_dump($res);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3101">at line 3101</a></div>
        <code>                    Redis|string|false
    <strong>xadd</strong>(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append a message to a stream.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream name.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$id</td>
                <td><p>The ID for the message we want to add.  This can be the special value '<em>'
which means Redis will generate the ID that appends the message to the
end of the stream.  It can also be a value in the form <ms>-</em> which will
generate an ID that appends to the end of entries with the same <ms> value
(if any exist).</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$values</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$maxlen</td>
                <td><p>If specified Redis will append the new message but trim any number of the
oldest messages in the stream until the length is &lt;= $maxlen.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$approx</td>
                <td><p>Used in conjunction with <code>$maxlen</code>, this flag tells Redis to trim the stream
but in a more efficient way, meaning the trimming may not be exactly to
<code>$maxlen</code> values.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$nomkstream</td>
                <td><p>If passed as <code>TRUE</code>, the stream must exist for Redis to append the message.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xadd">https://redis.io/commands/xadd</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ds9-season-1&#039;, &#039;1-1&#039;, [&#039;title&#039; =&gt; &#039;Emissary Part 1&#039;]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ds9-season-1&#039;, &#039;1-2&#039;, [&#039;title&#039; =&gt; &#039;A Man Alone&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xautoclaim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3140">at line 3140</a></div>
        <code>                    Redis|bool|array
    <strong>xautoclaim</strong>(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This command allows a consumer to claim pending messages that have been idle for a specified period of time.</p></p>                <p><p>Its purpose is to provide a mechanism for picking up messages that may have had a failed consumer.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to check.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>Which consumer to check.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$min_idle</td>
                <td><p>The minimum time in milliseconds for the message to have been pending.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum message id to check.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional limit on how many messages are returned.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$justid</td>
                <td><p>If the client only wants message IDs and not all of their data.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|bool|array</td>
            <td><p>An array of pending IDs or false if there are none, or on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xautoclaim">https://redis.io/commands/xautoclaim</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xclaim">https://redis.io/commands/xclaim</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/data-types/streams-tutorial/">https://redis.io/docs/data-types/streams-tutorial/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;combatants&#039;, &#039;0-0&#039;, true);<br />
<br />
$redis-&gt;xAdd(&#039;ships&#039;, &#039;1424-74205&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);<br />
<br />
// Consume the [&#039;name&#039; =&gt; &#039;Defiant&#039;] message<br />
$msgs = $redis-&gt;xReadGroup(&#039;combatants&#039;, &quot;Jem&#039;Hadar&quot;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);<br />
<br />
// The &quot;Jem&#039;Hadar&quot; consumer has the message presently<br />
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);<br />
var_dump($pending);<br />
<br />
// Assume control of the pending message with a different consumer.<br />
$res = $redis-&gt;xAutoClaim(&#039;ships&#039;, &#039;combatants&#039;, &#039;Sisko&#039;, 0, &#039;0-0&#039;);<br />
<br />
// Now the &#039;Sisko&#039; consumer owns the message<br />
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);<br />
var_dump($pending);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xclaim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3197">at line 3197</a></div>
        <code>                    Redis|array|bool
    <strong>xclaim</strong>(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This method allows a consumer to take ownership of pending stream entries, by ID.  Another
command that does much the same thing but does not require passing specific IDs is <code>Redis::xAutoClaim</code>.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream we wish to claim messages for.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>Our consumer group.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>Our consumer.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$min_idle</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An options array that modifies how the command operates.</p>
<pre><code># Following is an options array describing every option you can pass.  Note that
# 'IDLE', and 'TIME' are mutually exclusive.
$options = [
    'IDLE'       =&gt; 3            # Set the idle time of the message to a 3.  By default
                                 # the idle time is set to zero.
    'TIME'       =&gt; 1000*time()  # Same as IDLE except it takes a unix timestamp in
                                 # milliseconds.
    'RETRYCOUNT' =&gt; 0            # Set the retry counter to zero.  By default XCLAIM
                                 # doesn't modify the counter.
    'FORCE'                      # Creates the pending message entry even if IDs are
                                 # not already
                                 # in the PEL with another client.
    'JUSTID'                     # Return only an array of IDs rather than the messages
                                 # themselves.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array of claimed messages or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xclaim">https://redis.io/commands/xclaim</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xautoclaim.">https://redis.io/commands/xautoclaim.</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;combatants&#039;, &#039;0-0&#039;, true);<br />
<br />
$redis-&gt;xAdd(&#039;ships&#039;, &#039;1424-74205&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);<br />
<br />
// Consume the [&#039;name&#039; =&gt; &#039;Defiant&#039;] message<br />
$msgs = $redis-&gt;xReadGroup(&#039;combatants&#039;, &quot;Jem&#039;Hadar&quot;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);<br />
<br />
// The &quot;Jem&#039;Hadar&quot; consumer has the message presently<br />
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);<br />
var_dump($pending);<br />
<br />
assert($pending &amp;&amp; isset($pending[1]));<br />
<br />
// Claim the message by ID.<br />
$claimed = $redis-&gt;xClaim(&#039;ships&#039;, &#039;combatants&#039;, &#039;Sisko&#039;, 0, [$pending[1]], [&#039;JUSTID&#039;]);<br />
var_dump($claimed);<br />
<br />
// Now the &#039;Sisko&#039; consumer owns the message<br />
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);<br />
var_dump($pending);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xdel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3209">at line 3209</a></div>
        <code>                    Redis|int|false
    <strong>xdel</strong>(string $key, array $ids)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more specific IDs from a stream.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to modify.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td><p>One or more message IDs to remove.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of messages removed or false on failure.</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xDel(&#039;stream&#039;, [&#039;1-1&#039;, &#039;2-1&#039;, &#039;3-1&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xgroup">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3247">at line 3247</a></div>
        <code>                    mixed
    <strong>xgroup</strong>(string $operation, string $key = null, string $group = null, string $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p>XGROUP</p>                <p><p>Perform various operation on consumer groups for a particular Redis STREAM.  What the command does
is primarily based on which operation is passed.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The subcommand you intend to execute.  Valid options are as follows
'HELP'           - Redis will return information about the command
Requires: none
'CREATE'         - Create a consumer group.
Requires:  Key, group, consumer.
'SETID'          - Set the ID of an existing consumer group for the stream.
Requires:  Key, group, id.
'CREATECONSUMER' - Create a new consumer group for the stream.  You must
also pass key, group, and the consumer name you wish to
create.
Requires:  Key, group, consumer.
'DELCONSUMER'    - Delete a consumer from group attached to the stream.
Requires:  Key, group, consumer.
'DESTROY'        - Delete a consumer group from a stream.
Requires:  Key, group.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The STREAM we're operating on.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group we want to create/modify/delete.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$id_or_consumer</td>
                <td><p>The STREAM id (e.g. '$') or consumer group.  See the operation section
for information about which to send.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$mkstream</td>
                <td><p>This flag may be sent in combination with the 'CREATE' operation, and
cause Redis to also create the STREAM if it doesn't currently exist.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$entries_read</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command return various results depending on the operation performed.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xgroup/">https://redis.io/commands/xgroup/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xinfo">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3266">at line 3266</a></div>
        <code>                    mixed
    <strong>xinfo</strong>(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve information about a stream key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The specific info operation to perform.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$arg1</td>
                <td><p>The first argument (depends on operation)</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$arg2</td>
                <td><p>The second argument</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The COUNT argument to <code>XINFO STREAM</code></p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return different things depending on the operation being called.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xinfo">https://redis.io/commands/xinfo</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;CONSUMERS&#039;, &#039;stream&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;GROUPS&#039;, &#039;stream&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;STREAM&#039;, &#039;stream&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xlen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3280">at line 3280</a></div>
        <code>                    Redis|int|false
    <strong>xlen</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the number of messages in a Redis STREAM key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Stream to check.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of messages or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xlen">https://redis.io/commands/xlen</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xLen(&#039;stream&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xpending">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3299">at line 3299</a></div>
        <code>                    Redis|array|false
    <strong>xpending</strong>(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Interact with stream messages that have been consumed by a consumer group but not yet
acknowledged with XACK.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to inspect.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The user group we want to see pending messages from.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$start</td>
                <td><p>The minimum ID to consider.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$end</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional maximum number of messages to return.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$consumer</td>
                <td><p>If provided, limit the returned messages to a specific consumer.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The pending messages belonging to the stream or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xpending">https://redis.io/commands/xpending</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xreadgroup">https://redis.io/commands/xreadgroup</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3316">at line 3316</a></div>
        <code>                    Redis|array|bool
    <strong>xrange</strong>(string $key, string $start, string $end, int $count = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a range of entries from a STREAM key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream key name to list.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum ID to return.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum ID to return.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional maximum number of entries to return.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The entries in the stream within the requested range or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xrange">https://redis.io/commands/xrange</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xRange(&#039;stream&#039;, &#039;0-1&#039;, &#039;0-2&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xRange(&#039;stream&#039;, &#039;-&#039;, &#039;+&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xread">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3340">at line 3340</a></div>
        <code>                    Redis|array|bool
    <strong>xread</strong>(array $streams, int $count = -1, int $block = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Consume one or more unconsumed elements in one or more streams.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$streams</td>
                <td><p>An associative array with stream name keys and minimum id values.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional limit to how many entries are returned <em>per stream</em></p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$block</td>
                <td><p>An optional maximum number of milliseconds to block the caller if no
data is available on any of the provided streams.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array of read elements or false if there aren't any.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xread">https://redis.io/commands/xread</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-1&#039;, [&#039;title&#039; =&gt; &#039;The Search, Part I&#039;]);<br />
$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-2&#039;, [&#039;title&#039; =&gt; &#039;The Search, Part II&#039;]);<br />
$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-3&#039;, [&#039;title&#039; =&gt; &#039;The House Of Quark&#039;]);<br />
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-1&#039;, [&#039;title&#039; =&gt; &#039;The Way of the Warrior&#039;]);<br />
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-3&#039;, [&#039;title&#039; =&gt; &#039;The Visitor&#039;]);<br />
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-4&#039;, [&#039;title&#039; =&gt; &#039;Hippocratic Oath&#039;]);<br />
<br />
$redis-&gt;xRead([&#039;s03&#039; =&gt; &#039;3-2&#039;, &#039;s04&#039; =&gt; &#039;4-1&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xreadgroup">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3375">at line 3375</a></div>
        <code>                    Redis|array|bool
    <strong>xreadgroup</strong>(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Read one or more messages using a consumer group.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to use.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>The consumer to use.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$streams</td>
                <td><p>An array of stream names and message IDs</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional maximum number of messages to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$block</td>
                <td><p>How long to block if there are no messages available.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>Zero or more unread messages or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xreadgroup">https://redis.io/commands/xreadgroup</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;episodes&#039;, &#039;ds9&#039;, &#039;0-0&#039;, true);<br />
<br />
$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-1&#039;, [&#039;title&#039; =&gt; &#039;Emissary: Part 1&#039;]);<br />
$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-2&#039;, [&#039;title&#039; =&gt; &#039;A Man Alone&#039;]);<br />
<br />
$messages = $redis-&gt;xReadGroup(&#039;ds9&#039;, &#039;sisko&#039;, [&#039;episodes&#039; =&gt; &#039;&gt;&#039;]);<br />
<br />
// After having read the two messages, add another<br />
$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-3&#039;, [&#039;title&#039; =&gt; &#039;Emissary: Part 2&#039;]);<br />
<br />
// Acknowledge the first two read messages<br />
foreach ($messages as $stream =&gt; $stream_messages) {<br />
    $ids = array_keys($stream_messages);<br />
    $redis-&gt;xAck(&#039;stream&#039;, &#039;ds9&#039;, $ids);<br />
}<br />
<br />
// We can now pick up where we left off, and will only get the final message<br />
$msgs = $redis-&gt;xReadGroup(&#039;ds9&#039;, &#039;sisko&#039;, [&#039;episodes&#039; =&gt; &#039;&gt;&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xrevrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3393">at line 3393</a></div>
        <code>                    Redis|array|bool
    <strong>xrevrange</strong>(string $key, string $end, string $start, int $count = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a range of entries from a STREAM key in reverse chronological order.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream key to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum message ID to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum message ID to include.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional maximum number of messages to include.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The entries within the requested range, from newest to oldest.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xrevrange">https://redis.io/commands/xrevrange</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xrange">https://redis.io/commands/xrange</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xRevRange(&#039;stream&#039;, &#039;0-2&#039;, &#039;0-1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xRevRange(&#039;stream&#039;, &#039;+&#039;, &#039;-&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_xtrim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3415">at line 3415</a></div>
        <code>                    Redis|int|false
    <strong>xtrim</strong>(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Truncate a STREAM key in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The STREAM key to trim.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$threshold</td>
                <td><p>This can either be a maximum length, or a minimum id.
MAXLEN - An integer describing the maximum desired length of the stream after the command.
MINID  - An ID that will become the new minimum ID in the stream, as Redis will trim all
messages older than this ID.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$approx</td>
                <td><p>Whether redis is allowed to do an approximate trimming of the stream.  This is
more efficient for Redis given how streams are stored internally.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$minid</td>
                <td><p>When set to <code>true</code>, users should pass a minimum ID to the <code>$threshold</code> argument.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>An optional upper bound on how many entries to trim during the command.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of entries deleted from the stream.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/xtrim">https://redis.io/commands/xtrim</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xTrim(&#039;stream&#039;, 3);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xTrim(&#039;stream&#039;, &#039;2-1&#039;, false, true);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zAdd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3456">at line 3456</a></div>
        <code>                    Redis|int|false
    <strong>zAdd</strong>(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more elements and scores to a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>array|float</td>
                <td>$score_or_options</td>
                <td><p>Either the score for the first element, or an array of options.</p>
<pre><code>
 $options = [
     'NX',       # Only update elements that already exist
     'NX',       # Only add new elements but don't update existing ones.

     'LT'        # Only update existing elements if the new score is
                 # less than the existing one.
     'GT'        # Only update existing elements if the new score is
                 # greater than the existing one.

     'CH'        # Instead of returning the number of elements added,
                 # Redis will return the number Of elements that were
                 # changed in the operation.

     'INCR'      # Instead of setting each element to the provide score,
                 # increment the element by the
                 # provided score, much like ZINCRBY.  When this option
                 # is passed, you may only send a single score and member.
 ];

 Note:  'GX', 'LT', and 'NX' cannot be passed together, and PhpRedis
        will send whichever one is last in the options array.</code></pre></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$more_scores_and_mems</td>
                <td><p>A variadic number of additional scores and members.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The return value varies depending on the options passed.</p>
<p>Following is information about the options that may be passed as the second argument:</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zadd">https://redis.io/commands/zadd</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;zs&#039;, 1, &#039;first&#039;, 2, &#039;second&#039;, 3, &#039;third&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, [&#039;XX&#039;], 8, &#039;second&#039;, 99, &#039;new-element&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zCard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3469">at line 3469</a></div>
        <code>                    Redis|int|false
    <strong>zCard</strong>(string $key)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the number of elements in a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to retrieve cardinality from.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements in the set or false on failure</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zcard">https://redis.io/commands/zcard</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zCard(&#039;zs&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zCount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3487">at line 3487</a></div>
        <code>                    Redis|int|false
    <strong>zCount</strong>(string $key, string $start, string $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of members in a sorted set with scores inside a provided range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zcount">https://redis.io/commands/zcount</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zCount(&#039;fruit-rankings&#039;, &#039;0&#039;, &#039;+inf&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zCount(&#039;fruit-rankings&#039;, 50, 60);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zCount(&#039;fruit-rankings&#039;, &#039;-inf&#039;, 0);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zIncrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3502">at line 3502</a></div>
        <code>                    Redis|float|false
    <strong>zIncrBy</strong>(string $key, float $value, mixed $member)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create or increment the score of a member in a Redis sorted set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td><p>How much to increment the score.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The new score of the member or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zincrby">https://redis.io/commands/zincrby</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zIncrBy(&#039;zs&#039;, 5.0, &#039;bananas&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zIncrBy(&#039;zs&#039;, 2.0, &#039;eggplants&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zLexCount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3520">at line 3520</a></div>
        <code>                    Redis|int|false
    <strong>zLexCount</strong>(string $key, string $min, string $max)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of elements in a sorted set whose members fall within the provided
lexographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum matching lexographical string</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum matching lexographical string</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members that fall within the range or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zlexcount">https://redis.io/commands/zlexcount</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;captains&#039;, 0, &#039;Janeway&#039;, 0, &#039;Kirk&#039;, 0, &#039;Picard&#039;, 0, &#039;Sisko&#039;, 0, &#039;Archer&#039;);<br />
$redis-&gt;zLexCount(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zMscore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3539">at line 3539</a></div>
        <code>                    Redis|array|false
    <strong>zMscore</strong>(string $key, mixed $member, mixed ...$other_members)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the score of one or more members in a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The first member to return the score from</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_members</td>
                <td><p>One or more additional members to return the scores of.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of the scores of the requested elements.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zmscore">https://redis.io/commands/zmscore</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);<br />
<br />
$redis-&gt;zMScore(&#039;zs&#039;, &#039;zero&#039;, &#039;two&#039;);<br />
$redis-&gt;zMScore(&#039;zs&#039;, &#039;one&#039;, &#039;not-a-member&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zPopMax">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3557">at line 3557</a></div>
        <code>                    Redis|array|false
    <strong>zPopMax</strong>(string $key, int $count = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more of the highest scoring elements from a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pop elements from.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count of elements to pop.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All of the popped elements with scores or false on fialure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zpopmax">https://redis.io/commands/zpopmax</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);<br />
<br />
$redis-&gt;zPopMax(&#039;zs&#039;);<br />
$redis-&gt;zPopMax(&#039;zs&#039;, 2);.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zPopMin">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3575">at line 3575</a></div>
        <code>                    Redis|array|false
    <strong>zPopMin</strong>(string $key, int $count = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more of the lowest scoring elements from a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pop elements from.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count of elements to pop.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The popped elements with their scores or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zpopmin">https://redis.io/commands/zpopmin</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);<br />
<br />
$redis-&gt;zPopMin(&#039;zs&#039;);<br />
$redis-&gt;zPopMin(&#039;zs&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3610">at line 3610</a></div>
        <code>                    Redis|array|false
    <strong>zRange</strong>(string $key, mixed $start, mixed $end, array|bool|null $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of elements of a sorted set between a start and end point.</p></p>                <p><p>How the command works in particular is greatly affected by the options that
are passed in.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$start</td>
                <td><p>The starting index we want to return.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$end</td>
                <td><p>The final index we want to return.</p></td>
            </tr>
                    <tr>
                <td>array|bool|null</td>
                <td>$options</td>
                <td><p>This value may either be an array of options to pass to
the command, or for historical purposes a boolean which
controls just the 'WITHSCORES' option.</p>
<pre><code>$options = [
    'WITHSCORES' =&gt; true,     # Return both scores and members.
    'LIMIT'      =&gt; [10, 10], # Start at offset 10 and return 10 elements.
    'REV'                     # Return the elements in reverse order
    'BYSCORE',                # Treat `start` and `end` as scores instead
    'BYLEX'                   # Treat `start` and `end` as lexicographical values.
];</code></pre>
<p>Note:  'BYLEX' and 'BYSCORE' are mutually exclusive.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array with matching elements or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrange/">https://redis.io/commands/zrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRange(&#039;zset&#039;, 0, -1);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRange(&#039;zset&#039;, &#039;-inf&#039;, &#039;inf&#039;, [&#039;byscore&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3632">at line 3632</a></div>
        <code>                    Redis|array|false
    <strong>zRangeByLex</strong>(string $key, string $min, string $max, int $offset = -1, int $count = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of elements from a sorted set by legographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to retrieve elements from</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum legographical value to return</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum legographical value to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td><p>An optional offset within the matching values to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count to limit the replies to (used in conjunction with offset)</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of matching elements or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrangebylex">https://redis.io/commands/zrangebylex</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);<br />
$redis-&gt;zAdd(&#039;captains&#039;, 0, &#039;Janeway&#039;, 0, &#039;Kirk&#039;, 0, &#039;Picard&#039;, 0, &#039;Sisko&#039;, 0, &#039;Archer&#039;);<br />
<br />
$redis-&gt;zRangeByLex(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;);<br />
$redis-&gt;zRangeByLex(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;, 2, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3653">at line 3653</a></div>
        <code>                    Redis|array|false
    <strong>zRangeByScore</strong>(string $key, string $start, string $end, array $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of members from a sorted set by their score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum score of elements that Redis should return.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum score of elements that Redis should return.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>Options that change how Redis will execute the command.</p>
<p>OPTION       TYPE            MEANING
'WITHSCORES' bool            Whether to also return scores.
'LIMIT'      [offset, count] Limit the reply to a subset of elements.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The number of matching elements or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrangebyscore">https://redis.io/commands/zrangebyscore</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRangeByScore(&#039;zs&#039;, 20, 30, [&#039;WITHSCORES&#039; =&gt; true]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRangeByScore(&#039;zs&#039;, 20, 30, [&#039;WITHSCORES&#039; =&gt; true, &#039;LIMIT&#039; =&gt; [5, 5]]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zrangestore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3673">at line 3673</a></div>
        <code>                    Redis|int|false
    <strong>zrangestore</strong>(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This command is similar to ZRANGE except that instead of returning the values directly
it will store them in a destination key provided by the user</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dstkey</td>
                <td><p>The key to store the resulting element(s)</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td><p>The source key with element(s) to retrieve</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The starting index to store</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The ending index to store</p></td>
            </tr>
                    <tr>
                <td>array|bool|null</td>
                <td>$options</td>
                <td><p>Our options array that controls how the command will function.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in $dstkey or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrange/">https://redis.io/commands/zrange/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            Redis::zRange
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRandMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3692">at line 3692</a></div>
        <code>                    Redis|string|array
    <strong>zRandMember</strong>(string $key, array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more random members from a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pull random members from.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>One or more options that determine exactly how the command operates.</p>
<p>OPTION       TYPE     MEANING
'COUNT'      int      The number of random members to return.
'WITHSCORES' bool     Whether to return scores and members instead of</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|string|array</td>
            <td><p>One ore more random elements.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrandmember">https://redis.io/commands/zrandmember</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRandMember(&#039;zs&#039;, [&#039;COUNT&#039; =&gt; 2, &#039;WITHSCORES&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3706">at line 3706</a></div>
        <code>                    Redis|int|false
    <strong>zRank</strong>(string $key, mixed $member)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the rank of a member of a sorted set, by score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The rank of the requested member.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrank">https://redis.io/commands/zrank</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRank(&#039;zs&#039;, &#039;zero&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRank(&#039;zs&#039;, &#039;three&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3721">at line 3721</a></div>
        <code>                    Redis|int|false
    <strong>zRem</strong>(mixed $key, mixed $member, mixed ...$other_members)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members from a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The first member to remove.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_members</td>
                <td><p>One or more members to remove passed in a variadic fashion.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members that were actually removed or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrem">https://redis.io/commands/zrem</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRem(&#039;zs&#039;, &#039;mem:0&#039;, &#039;mem:1&#039;, &#039;mem:2&#039;, &#039;mem:6&#039;, &#039;mem:7&#039;, &#039;mem:8&#039;, &#039;mem:9&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRemRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3738">at line 3738</a></div>
        <code>                    Redis|int|false
    <strong>zRemRangeByLex</strong>(string $key, string $min, string $max)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove zero or more elements from a Redis sorted set by legographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to remove elements from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The start of the lexographical range to remove.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The end of the lexographical range to remove</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements removed from the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zremrangebylex">https://redis.io/commands/zremrangebylex</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::zrangebylex()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRemRangeByLex(&#039;zs&#039;, &#039;[a&#039;, &#039;(b&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRemRangeByLex(&#039;zs&#039;, &#039;(banana&#039;, &#039;(eggplant&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRemRangeByRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3753">at line 3753</a></div>
        <code>                    Redis|int|false
    <strong>zRemRangeByRank</strong>(string $key, int $start, int $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members of a sorted set by their rank.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set where we want to remove members.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The rank when we want to start removing members</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The rank we want to stop removing membersk.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members removed from the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zremrangebyrank">https://redis.io/commands/zremrangebyrank</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRemRangeByRank(&#039;zs&#039;, 0, 3);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRemRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3770">at line 3770</a></div>
        <code>                    Redis|int|false
    <strong>zRemRangeByScore</strong>(string $key, string $start, string $end)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members of a sorted set by their score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set where we want to remove members.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The lowest score to remove.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The highest score to remove.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members removed from the set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zremrangebyrank">https://redis.io/commands/zremrangebyrank</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;, 6, &#039;six&#039;);<br />
$redis-&gt;zRemRangeByScore(&#039;zs&#039;, 2, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRevRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3791">at line 3791</a></div>
        <code>                    Redis|array|false
    <strong>zRevRange</strong>(string $key, int $start, int $end, mixed $scores = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List the members of a Redis sorted set in reverse order</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The index to start listing elements</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The index to stop listing elements.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$scores</td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The members (and possibly scores) of the matching elements or false
on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrevrange">https://redis.io/commands/zrevrange</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRange(&#039;zs&#039;, 2, 3);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1, true);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1, [&#039;withscores&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRevRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3810">at line 3810</a></div>
        <code>                    Redis|array|false
    <strong>zRevRangeByLex</strong>(string $key, string $max, string $min, int $offset = -1, int $count = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List members of a Redis sorted set within a legographical range, in reverse order.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The maximum legographical element to include in the result.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td><p>An option offset within the matching elements to start at.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count to limit the replies to.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The matching members or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrevrangebylex">https://redis.io/commands/zrevrangebylex</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::zrangebylex()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRangeByLex(&#039;captains&#039;, &#039;[Q&#039;, &#039;[J&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRangeByLex(&#039;captains&#039;, &#039;[Q&#039;, &#039;[J&#039;, 1, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRevRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3845">at line 3845</a></div>
        <code>                    Redis|array|false
    <strong>zRevRangeByScore</strong>(string $key, string $max, string $min, array|bool $options = [])
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List elements from a Redis sorted set by score, highest to lowest</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The highest score to include in the results.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The lowest score to include in the results.</p></td>
            </tr>
                    <tr>
                <td>array|bool</td>
                <td>$options</td>
                <td><p>An options array that modifies how the command executes.</p>
<pre><code>$options = [
    'WITHSCORES' =&gt; true|false # Whether or not to return scores
    'LIMIT' =&gt; [offset, count] # Return a subset of the matching members
];</code></pre>
<p>NOTE:  For legacy reason, you may also simply pass <code>true</code> for the
options argument, to mean <code>WITHSCORES</code>.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The matching members in reverse order of score or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrevrangebyscore">https://redis.io/commands/zrevrangebyscore</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;oldest-people&#039;, 122.4493, &#039;Jeanne Calment&#039;, 119.2932, &#039;Kane Tanaka&#039;,<br />
                              119.2658, &#039;Sarah Knauss&#039;,   118.7205, &#039;Lucile Randon&#039;,<br />
                              117.7123, &#039;Nabi Tajima&#039;,    117.6301, &#039;Marie-Louise Meilleur&#039;,<br />
                              117.5178, &#039;Violet Brown&#039;,   117.3753, &#039;Emma Morano&#039;,<br />
                              117.2219, &#039;Chiyo Miyako&#039;,   117.0740, &#039;Misao Okawa&#039;);<br />
<br />
$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, 122, 119);<br />
$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, &#039;inf&#039;, 118);<br />
$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, &#039;117.5&#039;, &#039;-inf&#039;, [&#039;LIMIT&#039; =&gt; [0, 1]]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zRevRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3863">at line 3863</a></div>
        <code>                    Redis|int|false
    <strong>zRevRank</strong>(string $key, mixed $member)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a member of a sorted set by reverse rank.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to look up.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The reverse rank (the rank if counted high to low) of the member or
false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zrevrank">https://redis.io/commands/zrevrank</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;ds9-characters&#039;, 10, &#039;Sisko&#039;, 9, &#039;Garak&#039;, 8, &#039;Dax&#039;, 7, &#039;Odo&#039;);<br />
<br />
$redis-&gt;zrevrank(&#039;ds9-characters&#039;, &#039;Sisko&#039;);<br />
$redis-&gt;zrevrank(&#039;ds9-characters&#039;, &#039;Garak&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3879">at line 3879</a></div>
        <code>                    Redis|float|false
    <strong>zScore</strong>(string $key, mixed $member)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the score of a member of a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member we wish to query.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>score of the requested element or false if it is not found.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zscore">https://redis.io/commands/zscore</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;telescopes&#039;, 11.9, &#039;LBT&#039;, 10.4, &#039;GTC&#039;, 10, &#039;HET&#039;);<br />
$redis-&gt;zScore(&#039;telescopes&#039;, &#039;LBT&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zdiff">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3900">at line 3900</a></div>
        <code>                    Redis|array|false
    <strong>zdiff</strong>(array $keys, array $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more sorted set key names, return every element that is in the first
set but not any of the others.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One ore more sorted sets.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array which can contain ['WITHSCORES' =&gt; true] if you want Redis to
return members and scores.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of members or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zdiff">https://redis.io/commands/zdiff</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;primes&#039;, 1, &#039;one&#039;, 3, &#039;three&#039;, 5, &#039;five&#039;);<br />
$redis-&gt;zAdd(&#039;evens&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);<br />
$redis-&gt;zAdd(&#039;mod3&#039;, 3, &#039;three&#039;, 6, &#039;six&#039;);<br />
<br />
$redis-&gt;zDiff([&#039;primes&#039;, &#039;evens&#039;, &#039;mod3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zdiffstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3916">at line 3916</a></div>
        <code>                    Redis|int|false
    <strong>zdiffstore</strong>(string $dst, array $keys)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Store the difference of one or more sorted sets in a destination sorted set.</p></p>                <p><p>See <a href="Redis.html#method_zdiff">Redis::zdiff</a> for a more detailed description of how the diff operation works.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more source key names</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in the destination set or false on
failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zdiff">https://redis.io/commands/zdiff</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zdiff">
Redis::zdiff</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zinter">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3939">at line 3939</a></div>
        <code>                    Redis|array|false
    <strong>zinter</strong>(array $keys, array|null $weights = null, array|null $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one or more sorted sets and return the members</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One ore more sorted sets.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array of weights to be applied to each set when performing
the intersection.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>Options for how Redis should combine duplicate elements when performing the
intersection.  See Redis::zunion() for details.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All of the members that exist in every set.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zinter">https://redis.io/commands/zinter</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;TNG&#039;, 2, &#039;Worf&#039;, 2.5, &#039;Data&#039;, 4.0, &#039;Picard&#039;);<br />
$redis-&gt;zAdd(&#039;DS9&#039;, 2.5, &#039;Worf&#039;, 3.0, &#039;Kira&#039;, 4.0, &#039;Sisko&#039;);<br />
<br />
$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;]);<br />
$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;], NULL, [&#039;withscores&#039; =&gt; true]);<br />
$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;], NULL, [&#039;withscores&#039; =&gt; true, &#039;aggregate&#039; =&gt; &#039;max&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zintercard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3962">at line 3962</a></div>
        <code>                    Redis|int|false
    <strong>zintercard</strong>(array $keys, int $limit = -1)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Similar to ZINTER but instead of returning the intersected values, this command returns the
cardinality of the intersected set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One ore more sorted set key names.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>An optional upper bound on the returned cardinality.  If set to a value
greater than zero, Redis will stop processing the intersection once the
resulting cardinality reaches this limit.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The cardinality of the intersection or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zintercard">https://redis.io/commands/zintercard</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zinter">https://redis.io/commands/zinter</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zinter">
Redis::zinter</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;, 4, &#039;four&#039;);<br />
$redis-&gt;zAdd(&#039;zs2&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);<br />
<br />
$redis-&gt;zInterCard([&#039;zs1&#039;, &#039;zs2&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zinterstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L3989">at line 3989</a></div>
        <code>                    Redis|int|false
    <strong>zinterstore</strong>(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one ore more sorted sets storing the result in a new sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination sorted set to store the intersected values.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One ore more sorted set key names.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array of floats to weight each passed input set.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$aggregate</td>
                <td><p>An optional aggregation method to use.</p>
<p>'SUM' - Store sum of all intersected members (this is the default).
'MIN' - Store minimum value for each intersected member.
'MAX' - Store maximum value for each intersected member.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The total number of members writtern to the destination set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zinterstore">https://redis.io/commands/zinterstore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zinter">https://redis.io/commands/zinter</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 3, &#039;apples&#039;, 2, &#039;pears&#039;);<br />
$redis-&gt;zAdd(&#039;zs2&#039;, 4, &#039;pears&#039;, 3, &#039;bananas&#039;);<br />
$redis-&gt;zAdd(&#039;zs3&#039;, 2, &#039;figs&#039;, 3, &#039;pears&#039;);<br />
<br />
$redis-&gt;zInterStore(&#039;fruit-sum&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;]);<br />
$redis-&gt;zInterStore(&#039;fruit-max&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;], NULL, &#039;MAX&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L4013">at line 4013</a></div>
        <code>                    Redis|array|false
    <strong>zscan</strong>(string $key, int|null $iterator, string|null $pattern = null, int $count = 0)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Scan the members of a sorted set incrementally, using a cursor</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to scan.</p></td>
            </tr>
                    <tr>
                <td>int|null</td>
                <td>$iterator</td>
                <td><p>A reference to an iterator that should be initialized to NULL initially, that
will be updated after each subsequent call to ZSCAN.  Once the iterator
has returned to zero the scan is complete</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern that limits which members are returned during
the scanning process.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint for Redis that tells it how many elements it should test before returning
from the call.  The higher the more work Redis may do in any one given call to
ZSCAN potentially blocking for longer periods of time.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of elements or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zscan">https://redis.io/commands/zscan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/scan">https://redis.io/commands/scan</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_scan">
Redis::scan</a>
                                    </td>
                <td>NOTE:  See Redis::scan() for detailed example code on how to call SCAN like commands.</td>
            </tr>
            </table>

            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zunion">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L4048">at line 4048</a></div>
        <code>                    Redis|array|false
    <strong>zunion</strong>(array $keys, array|null $weights = null, array|null $options = null)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the union of one or more sorted sets</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One ore more sorted set key names</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array with floating point weights used when performing the union.
Note that if this argument is passed, it must contain the same number of
elements as the $keys array.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array that modifies how this command functions.</p>
<pre><code>$options = [
    # By default when members exist in more than one set Redis will SUM
    # total score for each match.  Instead, it can return the AVG, MIN,
    # or MAX value based on this option.
    'AGGREGATE' =&gt; 'sum' | 'min' | 'max'

    # Whether Redis should also return each members aggregated score.
    'WITHSCORES' =&gt; true | false
]</code></pre></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The union of each sorted set or false on failure</p></td>
        </tr>
    </table>

            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;store1&#039;, &#039;store2&#039;, &#039;store3&#039;);<br />
$redis-&gt;zAdd(&#039;store1&#039;, 1, &#039;apples&#039;, 3, &#039;pears&#039;, 6, &#039;bananas&#039;);<br />
$redis-&gt;zAdd(&#039;store2&#039;, 3, &#039;apples&#039;, 5, &#039;coconuts&#039;, 2, &#039;bananas&#039;);<br />
$redis-&gt;zAdd(&#039;store3&#039;, 2, &#039;bananas&#039;, 6, &#039;apples&#039;, 4, &#039;figs&#039;);<br />
<br />
$redis-&gt;zUnion([&#039;store1&#039;, &#039;store2&#039;, &#039;store3&#039;], NULL, [&#039;withscores&#039; =&gt; true]);<br />
$redis-&gt;zUnion([&#039;store1&#039;, &#039;store3&#039;], [2, .5], [&#039;withscores&#039; =&gt; true]);<br />
$redis-&gt;zUnion([&#039;store1&#039;, &#039;store3&#039;], [2, .5], [&#039;withscores&#039; =&gt; true, &#039;aggregate&#039; =&gt; &#039;MIN&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                    <h3 id="method_zunionstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/main/redis.stub.php#L4071">at line 4071</a></div>
        <code>                    Redis|int|false
    <strong>zunionstore</strong>(string $dst, array $keys, array|null $weights = NULL, string|null $aggregate = NULL)
        </code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform a union on one or more Redis sets and store the result in a destination sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination set to store the union.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more input keys on which to perform our union.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional weights array used to weight each input set.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$aggregate</td>
                <td><p>An optional modifier in how Redis will combine duplicate members.
Valid:  'MIN', 'MAX', 'SUM'.</p></td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members stored in the destination set or false on failure.</p></td>
        </tr>
    </table>

            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/zunionstore">https://redis.io/commands/zunionstore</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zunion">
Redis::zunion</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 1, &#039;one&#039;, 3, &#039;three&#039;);<br />
$redis-&gt;zAdd(&#039;zs1&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);<br />
$redis-&gt;zadd(&#039;zs3&#039;, 1, &#039;one&#039;, 7, &#039;five&#039;);<br />
<br />
$redis-&gt;zUnionStore(&#039;dst&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
            </div>

    
</div><div id="footer">
        Generated by <a href="https://github.com/code-lts/doctum">Doctum, a API Documentation generator and fork of Sami</a>.</div></div>
    </div>
    </body>

</html>
